Fixed bug with saving/restoring shortcuts on multilingual setup.

This commit is contained in:
Martin Rotter 2014-02-28 07:42:16 +01:00
parent 4c5f2450d3
commit 1d66912488
2 changed files with 3 additions and 4 deletions

View file

@ -32,7 +32,7 @@ void DynamicShortcuts::save(const QList<QAction *> actions) {
foreach (QAction *action, actions) {
settings->setValue(APP_CFG_CUTS,
action->objectName(),
action->shortcut().toString(QKeySequence::NativeText));
action->shortcut().toString(QKeySequence::PortableText));
}
}
@ -42,8 +42,8 @@ void DynamicShortcuts::load(const QList<QAction *> actions) {
foreach (QAction *action, actions) {
QString shortcut_for_action = settings->value(APP_CFG_CUTS,
action->objectName(),
action->shortcut().toString(QKeySequence::NativeText)).toString();
action->shortcut().toString(QKeySequence::PortableText)).toString();
action->setShortcut(QKeySequence::fromString(shortcut_for_action,
QKeySequence::NativeText));
QKeySequence::PortableText));
}
}

View file

@ -83,7 +83,6 @@ int main(int argc, char *argv[]) {
SkinFactory::instance()->loadCurrentSkin();
// Load localization and setup locale before any widget is constructed.
//LoadLocalization();
Localization::instance()->load();
// These settings needs to be set before any QSettings object.