summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/keyboard.cpp2
-rw-r--r--gui/settings.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
index aa8f67a3..dbc3ab3a 100644
--- a/gui/keyboard.cpp
+++ b/gui/keyboard.cpp
@@ -19,7 +19,7 @@ auto keyboard_listener::make_token()
Qt::KeyboardModifiers m;
QKeySequence k_;
if (win_key::to_qt(k, k_, m))
- emit key_pressed({ int(m), int(k_) });
+ emit key_pressed({ int(m) | int(k_) });
}
};
}
diff --git a/gui/settings.cpp b/gui/settings.cpp
index 5ee59260..711fb0f0 100644
--- a/gui/settings.cpp
+++ b/gui/settings.cpp
@@ -168,8 +168,8 @@ void options_dialog::closeEvent(QCloseEvent *)
void options_dialog::bind_key(key_opts& kopts, QLabel* label)
{
kopts.button = -1;
- kopts.guid = "";
- kopts.keycode = "";
+ kopts.guid = {};
+ kopts.keycode = {};
auto k = new keyboard_listener;
k->setWindowModality(Qt::ApplicationModal);
k->deleteLater();
@@ -180,7 +180,7 @@ void options_dialog::bind_key(key_opts& kopts, QLabel* label)
[&](const QKeySequence& s)
{
kopts.keycode = s.toString(QKeySequence::PortableText);
- kopts.guid = "";
+ kopts.guid = {};
kopts.button = -1;
k->close();
});
@@ -191,7 +191,7 @@ void options_dialog::bind_key(key_opts& kopts, QLabel* label)
if (!held)
{
kopts.guid = guid;
- kopts.keycode = "";
+ kopts.keycode = {};
kopts.button = idx;
k->close();
}
@@ -208,8 +208,8 @@ void options_dialog::bind_key(key_opts& kopts, QLabel* label)
);
if (is_crap)
{
- kopts.keycode = QStringLiteral("");
- kopts.guid = QStringLiteral("");
+ kopts.keycode = {};
+ kopts.guid = {};
kopts.button = -1;
label->setText(tr("None"));
}