forked from qt-creator/qt-creator
Collect Qt Creator debug menu items into common submenu
instead of spreading them over the place. - rename "Logger..." to "Show Logs..." - create "Tools > Debug Qt Creator" menu and put "Show Logs", "Inspect Language Clients" and "Inspect C++ Code Model" there - add missing ellipsis That gets rid of the otherwise not useful "Language Client" submenu, and creates a nicer place for the "Show Logs" item. Change-Id: I2588b4c93327669579979dfbfce37005ada29dab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -701,16 +701,21 @@ void MainWindow::registerDefaultActions()
|
||||
cmd->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+0") : tr("Ctrl+0")));
|
||||
tmpaction->setEnabled(false);
|
||||
|
||||
// Debug Qt Creator menu
|
||||
mtools->appendGroup(Constants::G_TOOLS_DEBUG);
|
||||
ActionContainer *mtoolsdebug = ActionManager::createMenu(Constants::M_TOOLS_DEBUG);
|
||||
mtoolsdebug->menu()->setTitle(tr("Debug %1").arg(Constants::IDE_DISPLAY_NAME));
|
||||
mtools->addMenu(mtoolsdebug, Constants::G_TOOLS_DEBUG);
|
||||
|
||||
m_loggerAction = new QAction(tr("Show Logs..."), this);
|
||||
cmd = ActionManager::registerAction(m_loggerAction, Constants::LOGGER);
|
||||
mtoolsdebug->addAction(cmd);
|
||||
connect(m_loggerAction, &QAction::triggered, this, [] { LoggingViewer::showLoggingView(); });
|
||||
|
||||
// Options Action
|
||||
mtools->appendGroup(Constants::G_TOOLS_OPTIONS);
|
||||
mtools->addSeparator(Constants::G_TOOLS_OPTIONS);
|
||||
|
||||
m_loggerAction = new QAction(tr("Logger..."), this);
|
||||
cmd = ActionManager::registerAction(m_loggerAction, Constants::LOGGER);
|
||||
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
|
||||
connect(m_loggerAction, &QAction::triggered, this, [] { LoggingViewer::showLoggingView(); });
|
||||
mtools->addSeparator(Constants::G_TOOLS_OPTIONS);
|
||||
|
||||
m_optionsAction = new QAction(tr("&Options..."), this);
|
||||
m_optionsAction->setMenuRole(QAction::PreferencesRole);
|
||||
cmd = ActionManager::registerAction(m_optionsAction, Constants::OPTIONS);
|
||||
|
||||
Reference in New Issue
Block a user