Commit 85747fda authored by Igor Kushnir's avatar Igor Kushnir

Don't delay Stop and Tool Views action menus

For many years I thought that KDevelop's Stop toolbar menu was broken.
Today after digging into the relevant code and documentation I found out
that one has to press and hold the button for a few seconds for the
submenu to show up.

From the documentation to KActionMenu::setDelayed():
  Remember that if the "main" action (the toolbar button itself) cannot
  be clicked, then you should call setDelayed(false).

This is clearly the case for the Stop menu button and for the Tool Views
menu button (which can be added to the Main Toolbar through Configure
Toolbars dialog): clicking these buttons has no effect.
parent 5b2f9881
Pipeline #36700 failed with stage
in 60 minutes and 6 seconds
......@@ -480,6 +480,7 @@ void RunController::setupActions()
Core::self()->uiControllerInternal()->area(0, QStringLiteral("debug"))->addAction(action);
action = d->stopJobsMenu = new KActionMenu( QIcon::fromTheme(QStringLiteral("process-stop")), i18nc("@action", "Stop"), this);
action->setIconText(i18nc("@action Short text for 'Stop' used in the toolbar", "Stop"));
action->setToolTip(i18nc("@info:tooltip", "Menu allowing to stop individual jobs"));
action->setWhatsThis(i18nc("@info:whatsthis", "List of jobs that can be stopped individually."));
......@@ -137,8 +137,9 @@ MainWindowPrivate::MainWindowPrivate(MainWindow *w, Controller* controller)
connect(action, &QAction::triggered, this, &MainWindowPrivate::selectPreviousDock);
ac->addAction(QStringLiteral("select_previous_dock"), action);
action = new KActionMenu(i18nc("@title:menu", "Tool Views"), this);
ac->addAction(QStringLiteral("docks_submenu"), action);
auto* const toolViewsMenu = new KActionMenu(i18nc("@title:menu", "Tool Views"), this);
ac->addAction(QStringLiteral("docks_submenu"), toolViewsMenu);
idealController = new IdealController(m_mainWindow);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment