diff options
author | Kai Koehne <kai.koehne@digia.com> | 2014-01-24 09:51:52 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@digia.com> | 2014-01-24 14:19:46 +0100 |
commit | fd75b0888a1741e8a7d38621bc518ded95c94e31 (patch) | |
tree | 4a3f52c62c903cd67f4a4a6b90dc7f488b5637d1 | |
parent | 7f4c9a19f2a8bddc1a0b0ef8c7da97d6a94e58bd (diff) | |
download | qt-creator-fd75b0888a1741e8a7d38621bc518ded95c94e31.tar.gz |
Put "Technical Support", "Report Bug..." in a separate menu group
This allows other plugins to add actions here.
Change-Id: Id5b751bf719533842ba426ecdb4f98c43a73755b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
-rw-r--r-- | src/plugins/coreplugin/coreconstants.h | 1 | ||||
-rw-r--r-- | src/plugins/coreplugin/mainwindow.cpp | 6 | ||||
-rw-r--r-- | src/plugins/help/helpplugin.cpp | 20 |
3 files changed, 10 insertions, 17 deletions
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h index 547277f7d0..3422518870 100644 --- a/src/plugins/coreplugin/coreconstants.h +++ b/src/plugins/coreplugin/coreconstants.h @@ -175,6 +175,7 @@ const char G_WINDOW_OTHER[] = "QtCreator.Group.Window.Other"; // Help groups (global) const char G_HELP_HELP[] = "QtCreator.Group.Help.Help"; +const char G_HELP_SUPPORT[] = "QtCreator.Group.Help.Supprt"; const char G_HELP_ABOUT[] = "QtCreator.Group.Help.About"; const char ICON_MINUS[] = ":/core/images/minus.png"; diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 5d31975ed5..a7eb0a8d44 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -511,6 +511,7 @@ void MainWindow::registerDefaultContainers() menubar->addMenu(ac, Constants::G_HELP); ac->menu()->setTitle(tr("&Help")); ac->appendGroup(Constants::G_HELP_HELP); + ac->appendGroup(Constants::G_HELP_SUPPORT); ac->appendGroup(Constants::G_HELP_ABOUT); } @@ -746,6 +747,11 @@ void MainWindow::registerDefaultActions() mwindow->addMenu(mviews, Constants::G_WINDOW_VIEWS); mviews->menu()->setTitle(tr("&Views")); + // "Help" separators + mhelp->addSeparator(globalContext, Constants::G_HELP_SUPPORT); + if (!Utils::HostOsInfo::isMacHost()) + mhelp->addSeparator(globalContext, Constants::G_HELP_ABOUT); + // About IDE Action icon = QIcon::fromTheme(QLatin1String("help-about")); if (Utils::HostOsInfo::isMacHost()) diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 33ab67a5bd..8f961d2333 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -229,7 +229,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M"))); connect(action, SIGNAL(triggered()), this, SLOT(addBookmark())); - // Add Contents, Index, and Context menu items and a separator to the Help menu + // Add Contents, Index, and Context menu items action = new QAction(QIcon::fromTheme(QLatin1String("help-contents")), tr(SB_CONTENTS), this); cmd = ActionManager::registerAction(action, "Help.Contents", globalcontext); @@ -247,30 +247,16 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1)); connect(action, SIGNAL(triggered()), this, SLOT(activateContext())); - if (!Utils::HostOsInfo::isMacHost()) { - action = new QAction(this); - action->setSeparator(true); - cmd = ActionManager::registerAction(action, "Help.Separator", globalcontext); - ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); - } - action = new QAction(tr("Technical Support"), this); cmd = ActionManager::registerAction(action, "Help.TechSupport", globalcontext); - ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT); connect(action, SIGNAL(triggered()), this, SLOT(slotOpenSupportPage())); action = new QAction(tr("Report Bug..."), this); cmd = ActionManager::registerAction(action, "Help.ReportBug", globalcontext); - ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); + ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_SUPPORT); connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug())); - if (!Utils::HostOsInfo::isMacHost()) { - action = new QAction(this); - action->setSeparator(true); - cmd = ActionManager::registerAction(action, "Help.Separator2", globalcontext); - ActionManager::actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); - } - action = new QAction(this); ActionManager::registerAction(action, Core::Constants::PRINT, modecontext); connect(action, SIGNAL(triggered()), m_centralWidget, SLOT(print())); |