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
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