forked from qt-creator/qt-creator
ActionManager API cleanup.
d-pointer instead of inheritance static methods Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -197,11 +197,10 @@ void ModeManager::objectAdded(QObject *obj)
|
||||
d->m_modeStack->setTabEnabled(index, mode->isEnabled());
|
||||
|
||||
// Register mode shortcut
|
||||
ActionManager *am = d->m_mainWindow->actionManager();
|
||||
const Id shortcutId(QLatin1String("QtCreator.Mode.") + mode->id().toString());
|
||||
QShortcut *shortcut = new QShortcut(d->m_mainWindow);
|
||||
shortcut->setWhatsThis(tr("Switch to <b>%1</b> mode").arg(mode->displayName()));
|
||||
Command *cmd = am->registerShortcut(shortcut, shortcutId, Context(Constants::C_GLOBAL));
|
||||
Command *cmd = ActionManager::registerShortcut(shortcut, shortcutId, Context(Constants::C_GLOBAL));
|
||||
|
||||
d->m_modeShortcuts.insert(index, cmd);
|
||||
connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updateModeToolTip()));
|
||||
|
||||
Reference in New Issue
Block a user