From dc8ec1bf0141ec7706e5f2fcc868411df5f803f2 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 19 Nov 2011 06:49:32 +0100 Subject: [PATCH] Fix crash when toggling the menu-bar visibility 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 0ae00ea0d..31628c763 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -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 -- 2.47.3