diff options
Diffstat (limited to 'src/citra_qt/hotkeys.cpp')
| -rw-r--r-- | src/citra_qt/hotkeys.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/citra_qt/hotkeys.cpp b/src/citra_qt/hotkeys.cpp index 1aa1e8b96..bbaa4a8dc 100644 --- a/src/citra_qt/hotkeys.cpp +++ b/src/citra_qt/hotkeys.cpp | |||
| @@ -21,14 +21,14 @@ void SaveHotkeys(QSettings& settings) | |||
| 21 | { | 21 | { |
| 22 | settings.beginGroup("Shortcuts"); | 22 | settings.beginGroup("Shortcuts"); |
| 23 | 23 | ||
| 24 | for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group) | 24 | for (auto group : hotkey_groups) |
| 25 | { | 25 | { |
| 26 | settings.beginGroup(group->first); | 26 | settings.beginGroup(group.first); |
| 27 | for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey) | 27 | for (auto hotkey : group.second) |
| 28 | { | 28 | { |
| 29 | settings.beginGroup(hotkey->first); | 29 | settings.beginGroup(hotkey.first); |
| 30 | settings.setValue(QString("KeySeq"), hotkey->second.keyseq.toString()); | 30 | settings.setValue(QString("KeySeq"), hotkey.second.keyseq.toString()); |
| 31 | settings.setValue(QString("Context"), hotkey->second.context); | 31 | settings.setValue(QString("Context"), hotkey.second.context); |
| 32 | settings.endGroup(); | 32 | settings.endGroup(); |
| 33 | } | 33 | } |
| 34 | settings.endGroup(); | 34 | settings.endGroup(); |
| @@ -42,17 +42,17 @@ void LoadHotkeys(QSettings& settings) | |||
| 42 | 42 | ||
| 43 | // Make sure NOT to use a reference here because it would become invalid once we call beginGroup() | 43 | // Make sure NOT to use a reference here because it would become invalid once we call beginGroup() |
| 44 | QStringList groups = settings.childGroups(); | 44 | QStringList groups = settings.childGroups(); |
| 45 | for (QList<QString>::iterator group = groups.begin(); group != groups.end(); ++group) | 45 | for (auto group : groups) |
| 46 | { | 46 | { |
| 47 | settings.beginGroup(*group); | 47 | settings.beginGroup(group); |
| 48 | 48 | ||
| 49 | QStringList hotkeys = settings.childGroups(); | 49 | QStringList hotkeys = settings.childGroups(); |
| 50 | for (QList<QString>::iterator hotkey = hotkeys.begin(); hotkey != hotkeys.end(); ++hotkey) | 50 | for (auto hotkey : hotkeys) |
| 51 | { | 51 | { |
| 52 | settings.beginGroup(*hotkey); | 52 | settings.beginGroup(hotkey); |
| 53 | 53 | ||
| 54 | // RegisterHotkey assigns default keybindings, so use old values as default parameters | 54 | // RegisterHotkey assigns default keybindings, so use old values as default parameters |
| 55 | Hotkey& hk = hotkey_groups[*group][*hotkey]; | 55 | Hotkey& hk = hotkey_groups[group][hotkey]; |
| 56 | hk.keyseq = QKeySequence::fromString(settings.value("KeySeq", hk.keyseq.toString()).toString()); | 56 | hk.keyseq = QKeySequence::fromString(settings.value("KeySeq", hk.keyseq.toString()).toString()); |
| 57 | hk.context = (Qt::ShortcutContext)settings.value("Context", hk.context).toInt(); | 57 | hk.context = (Qt::ShortcutContext)settings.value("Context", hk.context).toInt(); |
| 58 | if (hk.shortcut) | 58 | if (hk.shortcut) |
| @@ -91,13 +91,13 @@ GHotkeysDialog::GHotkeysDialog(QWidget* parent): QDialog(parent) | |||
| 91 | { | 91 | { |
| 92 | ui.setupUi(this); | 92 | ui.setupUi(this); |
| 93 | 93 | ||
| 94 | for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group) | 94 | for (auto group : hotkey_groups) |
| 95 | { | 95 | { |
| 96 | QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group->first)); | 96 | QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group.first)); |
| 97 | for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey) | 97 | for (auto hotkey : group.second) |
| 98 | { | 98 | { |
| 99 | QStringList columns; | 99 | QStringList columns; |
| 100 | columns << hotkey->first << hotkey->second.keyseq.toString(); | 100 | columns << hotkey.first << hotkey.second.keyseq.toString(); |
| 101 | QTreeWidgetItem* item = new QTreeWidgetItem(columns); | 101 | QTreeWidgetItem* item = new QTreeWidgetItem(columns); |
| 102 | toplevel_item->addChild(item); | 102 | toplevel_item->addChild(item); |
| 103 | } | 103 | } |