Improve grouping and order in the build menu

Build related menu items are sorted by tasks, then configurations.
e.g.
+ Build
  + Build All Projects
  + Build All Projects for All Configurations
  ...
  + Rebuild All Projects
  + Rebuild All Projects for All Configurations
  ...
  + Clean All Projects
  + Clean All Projects for All Configurations
  ...

This patch changes the order to configuration > task like below

+ Build
  + ...
  + qmake / cmake
  + -
  + Build All Projects
  + Deploy
  + Rebuild
  + Clean
  + -
  + Build Project
  + Deploy
  + Rebuild
  + Clean
  + -
  + Build Subproject
  + Deploy
  + Rebuild
  + Clean
  + -
  + Build File
  + -
  + Build All Projects for All Configurations
  + Rebuild
  + Clean
  + -
  + Build Project for All Configurations
  + Rebuild
  + Clean
  + -
  + ...

Change-Id: I95844e51d2ae164ed9f29fdb1c51509611c514fe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tasuku Suzuki
2021-03-17 16:49:15 +09:00
parent bfe398072d
commit 3bd490acdb
8 changed files with 79 additions and 81 deletions

View File

@@ -76,7 +76,7 @@ CMakeManager::CMakeManager()
Constants::RUN_CMAKE,
globalContext);
command->setAttribute(Core::Command::CA_Hide);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_DEPLOY);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD);
connect(m_runCMakeAction, &QAction::triggered, [this]() {
runCMake(SessionManager::startupBuildSystem());
});
@@ -85,7 +85,7 @@ CMakeManager::CMakeManager()
Constants::CLEAR_CMAKE_CACHE,
globalContext);
command->setAttribute(Core::Command::CA_Hide);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_DEPLOY);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD);
connect(m_clearCMakeCacheAction, &QAction::triggered, [this]() {
clearCMakeCache(SessionManager::startupBuildSystem());
});
@@ -113,7 +113,7 @@ CMakeManager::CMakeManager()
Constants::RESCAN_PROJECT,
globalContext);
command->setAttribute(Core::Command::CA_Hide);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_DEPLOY);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_BUILD);
connect(m_rescanProjectAction, &QAction::triggered, [this]() {
rescanProject(ProjectTree::currentBuildSystem());
});