forked from qt-creator/qt-creator
Fix crash when restoring settings in registerShortcut
Introduced by c5cc4b1f13
Change-Id: Id546a4cf87cfb3709f11ee32439662fcda00bdd4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -283,7 +283,6 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
} else {
|
} else {
|
||||||
sc = new Shortcut(id);
|
sc = new Shortcut(id);
|
||||||
d->m_idCmdMap.insert(id, sc);
|
d->m_idCmdMap.insert(id, sc);
|
||||||
d->readUserSettings(id, sc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sc->shortcut()) {
|
if (sc->shortcut()) {
|
||||||
@@ -299,6 +298,7 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
sc->setShortcut(shortcut);
|
sc->setShortcut(shortcut);
|
||||||
sc->setScriptable(scriptable);
|
sc->setScriptable(scriptable);
|
||||||
sc->setContext(context);
|
sc->setContext(context);
|
||||||
|
d->readUserSettings(id, sc);
|
||||||
|
|
||||||
emit m_instance->commandListChanged();
|
emit m_instance->commandListChanged();
|
||||||
emit m_instance->commandAdded(id.toString());
|
emit m_instance->commandAdded(id.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user