forked from qt-creator/qt-creator
Properly mark "Check for Updates" menu item as an app-specific item
Check for Updates menu items are supposed to be displayed in the application menu on macOS, not the Help menu as for other platforms. Change-Id: I8d13f2658b3b0e0b9b01ef5b64bd7804d6b7e424 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -213,6 +213,7 @@ bool UpdateInfoPlugin::initialize(const QStringList & /* arguments */, QString *
|
|||||||
addAutoReleasedObject(new SettingsPage(this));
|
addAutoReleasedObject(new SettingsPage(this));
|
||||||
|
|
||||||
QAction *checkForUpdatesAction = new QAction(tr("Check for Updates"), this);
|
QAction *checkForUpdatesAction = new QAction(tr("Check for Updates"), this);
|
||||||
|
checkForUpdatesAction->setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
Core::Command *checkForUpdatesCommand = Core::ActionManager::registerAction(checkForUpdatesAction, "Updates.CheckForUpdates");
|
Core::Command *checkForUpdatesCommand = Core::ActionManager::registerAction(checkForUpdatesAction, "Updates.CheckForUpdates");
|
||||||
connect(checkForUpdatesAction, &QAction::triggered, this, &UpdateInfoPlugin::startCheckForUpdates);
|
connect(checkForUpdatesAction, &QAction::triggered, this, &UpdateInfoPlugin::startCheckForUpdates);
|
||||||
ActionContainer *const helpContainer = ActionManager::actionContainer(Core::Constants::M_HELP);
|
ActionContainer *const helpContainer = ActionManager::actionContainer(Core::Constants::M_HELP);
|
||||||
|
|||||||
Reference in New Issue
Block a user