]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix crash when toggling the menu-bar visibility
authorPeter Penz <peter.penz19@gmail.com>
Sat, 19 Nov 2011 05:49:32 +0000 (06:49 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 19 Nov 2011 05:51:31 +0000 (06:51 +0100)
Use a queued connection to prevent that the menu
gets hidden during it is still open. Thanks to
Christoph Feck for the hint!

Frank and I could not reproduce the issue in our
environments even when following the steps from
bug 278366, however Christoph's hint sounds sane
and let's hope it works (leaves a bad gut feeling
to "fix" bugs without being able to verify them).

CCBUG: 286822
CCBUG: 278366
FIXED-IN: 4.7.4

src/dolphinmainwindow.cpp

index 0ae00ea0d95488c703579a59378808ae742164ab..31628c763a846c5f797ee88c46adc261868c227f 100644 (file)
@@ -1702,7 +1702,9 @@ void DolphinMainWindow::setupActions()
     connect(openTerminal, SIGNAL(triggered()), this, SLOT(openTerminal()));
 
     // setup 'Settings' menu
-    KStandardAction::showMenubar(this, SLOT(toggleShowMenuBar()), actionCollection());
+    KToggleAction* showMenuBar = KStandardAction::showMenubar(0, 0, actionCollection());
+    connect(showMenuBar, SIGNAL(triggered(bool)),                   // Fixes #286822
+            this, SLOT(toggleShowMenuBar()), Qt::QueuedConnection);
     KStandardAction::preferences(this, SLOT(editSettings()), actionCollection());
 
     // not in menu actions