coreplugin/mac: set menu role before adding menu

improves menu behaviour for qt5 on osx

Task-number: QTCREATORBUG-8152
Change-Id: I6ff7703d45ff5e250c7fae9a8c85f8d8ef078e16
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-02-27 01:07:13 +01:00
committed by Eike Ziller
parent a128d38394
commit bf73aac39f

View File

@@ -773,19 +773,19 @@ void MainWindow::registerDefaultActions()
else
tmpaction = new QAction(icon, tr("About &Qt Creator..."), this);
cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_QTCREATOR, globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
if (Utils::HostOsInfo::isMacHost())
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutQtCreator()));
//About Plugins Action
tmpaction = new QAction(tr("About &Plugins..."), this);
cmd = ActionManager::registerAction(tmpaction, Constants::ABOUT_PLUGINS, globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
if (Utils::HostOsInfo::isMacHost())
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
// About Qt Action
// tmpaction = new QAction(tr("About &Qt..."), this);