summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/hotkeys.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-08-12 02:44:59 +0200
committerarchshift <admin@archshift.com>2014-08-12 02:53:23 +0200
commit5a7c3ad1945c2829d03642b4526b9a066c73f06c (patch)
tree6f9f7e4d63549c68f1eff00587e4b97617b1326d /src/citra_qt/hotkeys.cpp
parentMerge pull request #40 from bentley/master (diff)
downloadyuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.tar
yuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.tar.gz
yuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.tar.bz2
yuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.tar.lz
yuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.tar.xz
yuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.tar.zst
yuzu-5a7c3ad1945c2829d03642b4526b9a066c73f06c.zip
Diffstat (limited to '')
-rw-r--r--src/citra_qt/hotkeys.cpp30
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)
{
settings.beginGroup("Shortcuts");
- for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group)
+ for (auto group : hotkey_groups)
{
- settings.beginGroup(group->first);
- for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey)
+ settings.beginGroup(group.first);
+ for (auto hotkey : group.second)
{
- settings.beginGroup(hotkey->first);
- settings.setValue(QString("KeySeq"), hotkey->second.keyseq.toString());
- settings.setValue(QString("Context"), hotkey->second.context);
+ settings.beginGroup(hotkey.first);
+ settings.setValue(QString("KeySeq"), hotkey.second.keyseq.toString());
+ settings.setValue(QString("Context"), hotkey.second.context);
settings.endGroup();
}
settings.endGroup();
@@ -42,17 +42,17 @@ void LoadHotkeys(QSettings& settings)
// Make sure NOT to use a reference here because it would become invalid once we call beginGroup()
QStringList groups = settings.childGroups();
- for (QList<QString>::iterator group = groups.begin(); group != groups.end(); ++group)
+ for (auto group : groups)
{
- settings.beginGroup(*group);
+ settings.beginGroup(group);
QStringList hotkeys = settings.childGroups();
- for (QList<QString>::iterator hotkey = hotkeys.begin(); hotkey != hotkeys.end(); ++hotkey)
+ for (auto hotkey : hotkeys)
{
- settings.beginGroup(*hotkey);
+ settings.beginGroup(hotkey);
// RegisterHotkey assigns default keybindings, so use old values as default parameters
- Hotkey& hk = hotkey_groups[*group][*hotkey];
+ Hotkey& hk = hotkey_groups[group][hotkey];
hk.keyseq = QKeySequence::fromString(settings.value("KeySeq", hk.keyseq.toString()).toString());
hk.context = (Qt::ShortcutContext)settings.value("Context", hk.context).toInt();
if (hk.shortcut)
@@ -91,13 +91,13 @@ GHotkeysDialog::GHotkeysDialog(QWidget* parent): QDialog(parent)
{
ui.setupUi(this);
- for (HotkeyGroupMap::iterator group = hotkey_groups.begin(); group != hotkey_groups.end(); ++group)
+ for (auto group : hotkey_groups)
{
- QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group->first));
- for (HotkeyMap::iterator hotkey = group->second.begin(); hotkey != group->second.end(); ++hotkey)
+ QTreeWidgetItem* toplevel_item = new QTreeWidgetItem(QStringList(group.first));
+ for (auto hotkey : group.second)
{
QStringList columns;
- columns << hotkey->first << hotkey->second.keyseq.toString();
+ columns << hotkey.first << hotkey.second.keyseq.toString();
QTreeWidgetItem* item = new QTreeWidgetItem(columns);
toplevel_item->addChild(item);
}