[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/inc vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jan 28 15:02:52 UTC 2019


 vcl/inc/qt5/Qt5Menu.hxx |    1 -
 vcl/qt5/Qt5Menu.cxx     |    8 +++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 911a55230676a0a996cc967b7143fb6ceb41c102
Author:     Aleksei Nikiforov <darktemplar at basealt.ru>
AuthorDate: Fri Jan 11 16:41:19 2019 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Jan 28 16:02:30 2019 +0100

    KDE5: minor Qt5Menu cleanup
    
    Remove unnecessary destructor
    
    Move MenuBar clearing out of DoFullMenuUpdate function
    
    Change-Id: I0fb916c6935b2f8a675e75adf696d99203a2c016
    Reviewed-on: https://gerrit.libreoffice.org/66386
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit f9231f054e5b6597ae8a92da165a1841e4199378)
    Reviewed-on: https://gerrit.libreoffice.org/66992
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx
index b3b06bfeabac..e41fb041ab81 100644
--- a/vcl/inc/qt5/Qt5Menu.hxx
+++ b/vcl/inc/qt5/Qt5Menu.hxx
@@ -40,7 +40,6 @@ private:
 
 public:
     Qt5Menu(bool bMenuBar);
-    virtual ~Qt5Menu() override;
 
     virtual bool VisibleMenuBar() override; // must return TRUE to actually DISPLAY native menu bars
 
diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 9aaea199eeae..ceaf0d9138f9 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -32,8 +32,6 @@ Qt5Menu::Qt5Menu(bool bMenuBar)
     connect(this, &Qt5Menu::setFrameSignal, this, &Qt5Menu::SetFrame, Qt::BlockingQueuedConnection);
 }
 
-Qt5Menu::~Qt5Menu() { maItems.clear(); }
-
 bool Qt5Menu::VisibleMenuBar() { return true; }
 
 QMenu* Qt5Menu::InsertMenuItem(Qt5MenuItem* pSalMenuItem, unsigned nPos)
@@ -227,6 +225,9 @@ void Qt5Menu::SetFrame(const SalFrame* pFrame)
     if (pMainWindow)
     {
         mpQMenuBar = pMainWindow->menuBar();
+        if (mpQMenuBar)
+            mpQMenuBar->clear();
+
         mpQMenu = nullptr;
         mpQActionGroup = nullptr;
 
@@ -236,9 +237,6 @@ void Qt5Menu::SetFrame(const SalFrame* pFrame)
 
 void Qt5Menu::DoFullMenuUpdate(Menu* pMenuBar)
 {
-    if (mbMenuBar && mpQMenuBar)
-        mpQMenuBar->clear();
-
     for (sal_Int32 nItem = 0; nItem < static_cast<sal_Int32>(GetItemCount()); nItem++)
     {
         Qt5MenuItem* pSalMenuItem = GetItemAtPos(nItem);


More information about the Libreoffice-commits mailing list