diff options
Diffstat (limited to 'src/plugins/Ui/skinned/actionmanager.cpp')
| -rw-r--r-- | src/plugins/Ui/skinned/actionmanager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/Ui/skinned/actionmanager.cpp b/src/plugins/Ui/skinned/actionmanager.cpp index b92866afe..9d8d72de7 100644 --- a/src/plugins/Ui/skinned/actionmanager.cpp +++ b/src/plugins/Ui/skinned/actionmanager.cpp @@ -136,6 +136,7 @@ QAction *ActionManager::createAction(QString name, QString confKey, QString key, { QAction *action = new QAction(name, this); action->setShortcut(m_settings->value(confKey, key).toString()); + action->setProperty("defaultShortcut", key); action->setObjectName(confKey); if(iconName.isEmpty()) return action; @@ -176,3 +177,12 @@ void ActionManager::saveActions() settings.setValue(QString("SkinnedShortcuts/")+action->objectName(), action->shortcut()); } } + +void ActionManager::resetShortcuts() +{ + foreach (QAction *action, m_actions.values()) + { + action->setShortcut(action->property("defaultShortcut").toString()); + qDebug("=%s=",qPrintable(action->property("defaultShortcut").toString())); + } +} |
