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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 27 21:17:42 UTC 2019


 vcl/qt5/Qt5Menu.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 8b0a9db87d776dbdb2cbbd1fd79ede13e2504321
Author:     Aleksei Nikiforov <darktemplar at basealt.ru>
AuthorDate: Mon Feb 25 18:06:11 2019 +0300
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Wed Feb 27 22:17:24 2019 +0100

    tdf#120824 KDE5: fix visible/enabled state for menu
    
    Change-Id: I003703f0bc2e1697124e068a68bfb2e24c33cd1a
    Reviewed-on: https://gerrit.libreoffice.org/68351
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit ea6b4b743d397f40029291954af6d37d9059042b)
    Reviewed-on: https://gerrit.libreoffice.org/68412
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 8fee56a9cf70..049d90b7b4da 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -157,15 +157,19 @@ QMenu* Qt5Menu::InsertMenuItem(Qt5MenuItem* pSalMenuItem, unsigned nPos)
                     pAction->setChecked(bChecked);
                 }
 
-                pAction->setEnabled(pSalMenuItem->mbEnabled);
-                pAction->setVisible(pSalMenuItem->mbVisible);
-
                 connect(pAction, &QAction::triggered, this,
                         [pSalMenuItem] { slotMenuTriggered(pSalMenuItem); });
             }
         }
     }
 
+    QAction* pAction = pSalMenuItem->getAction();
+    if (pAction)
+    {
+        pAction->setEnabled(pSalMenuItem->mbEnabled);
+        pAction->setVisible(pSalMenuItem->mbVisible);
+    }
+
     return pQMenu;
 }
 


More information about the Libreoffice-commits mailing list