[Libreoffice-commits] core.git: vcl/inc vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 16 21:40:23 UTC 2019


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

New commits:
commit f9231f054e5b6597ae8a92da165a1841e4199378
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: Wed Jan 16 22:39:53 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>

diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx
index d42f8ab85186..2f6e1a085fc8 100644
--- a/vcl/inc/qt5/Qt5Menu.hxx
+++ b/vcl/inc/qt5/Qt5Menu.hxx
@@ -43,7 +43,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