diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-06-13 13:46:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-06-14 14:49:06 +0000 |
commit | 61e087fe8aa3dc7d15281826d11cbc4f182df78a (patch) | |
tree | 8ab5b41536daa8b29383be91ac3b65ad81ad3f0a | |
parent | 62d41f1d93de7949c22eb689c8a9c936b654e980 (diff) |
ProjectExplorer: Enable location in subproject context menus
Enable location support in subproject context menu and update
the display of the location menu.
Change-Id: Iac09fb3d7ed3474b14f827ea6e8226b2c2ce9325
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index ad485a38c3..1c3a207177 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -749,12 +749,12 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ActionContainer *folderOpenLocationCtxMenu = ActionManager::createMenu(Constants::FOLDER_OPEN_LOCATIONS_CONTEXT_MENU); folderOpenLocationCtxMenu->menu()->setTitle(tr("Open...")); - folderOpenLocationCtxMenu->setOnAllDisabledBehavior(ActionContainer::Show); + folderOpenLocationCtxMenu->setOnAllDisabledBehavior(ActionContainer::Hide); ActionContainer *projectOpenLocationCtxMenu = ActionManager::createMenu(Constants::PROJECT_OPEN_LOCATIONS_CONTEXT_MENU); projectOpenLocationCtxMenu->menu()->setTitle(tr("Open...")); - projectOpenLocationCtxMenu->setOnAllDisabledBehavior(ActionContainer::Show); + projectOpenLocationCtxMenu->setOnAllDisabledBehavior(ActionContainer::Hide); // build menu ActionContainer *mbuild = @@ -791,10 +791,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er msessionContextMenu->appendGroup(Constants::G_PROJECT_TREE); mprojectContextMenu->appendGroup(Constants::G_PROJECT_FIRST); - mprojectContextMenu->appendGroup(Constants::G_FOLDER_LOCATIONS); mprojectContextMenu->appendGroup(Constants::G_PROJECT_BUILD); mprojectContextMenu->appendGroup(Constants::G_PROJECT_RUN); mprojectContextMenu->appendGroup(Constants::G_PROJECT_REBUILD); + mprojectContextMenu->appendGroup(Constants::G_FOLDER_LOCATIONS); mprojectContextMenu->appendGroup(Constants::G_PROJECT_FILES); mprojectContextMenu->appendGroup(Constants::G_PROJECT_LAST); mprojectContextMenu->appendGroup(Constants::G_PROJECT_TREE); @@ -804,13 +804,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er dd, &ProjectExplorerPluginPrivate::updateLocationSubMenus); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_FIRST); - msubProjectContextMenu->appendGroup(Constants::G_FOLDER_LOCATIONS); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_BUILD); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_RUN); + msubProjectContextMenu->appendGroup(Constants::G_FOLDER_LOCATIONS); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_FILES); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_LAST); msubProjectContextMenu->appendGroup(Constants::G_PROJECT_TREE); + msubProjectContextMenu->addMenu(projectOpenLocationCtxMenu, Constants::G_FOLDER_LOCATIONS); connect(msubProjectContextMenu->menu(), &QMenu::aboutToShow, dd, &ProjectExplorerPluginPrivate::updateLocationSubMenus); |