forked from qt-creator/qt-creator
Core: Make Context parameter to registerAction optional
... and default to C_GLOBAL. A rather common case. Similar for ActionContainer::addSeparator(). Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -180,7 +180,7 @@ void ModeManager::objectAdded(QObject *obj)
|
||||
// Register mode shortcut
|
||||
const Id actionId = mode->id().withPrefix("QtCreator.Mode.");
|
||||
QAction *action = new QAction(tr("Switch to <b>%1</b> mode").arg(mode->displayName()), this);
|
||||
Command *cmd = ActionManager::registerAction(action, actionId, Context(Constants::C_GLOBAL));
|
||||
Command *cmd = ActionManager::registerAction(action, actionId);
|
||||
|
||||
d->m_modeCommands.insert(index, cmd);
|
||||
connect(cmd, SIGNAL(keySequenceChanged()), m_instance, SLOT(updateModeToolTip()));
|
||||
|
||||
Reference in New Issue
Block a user