summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
Diffstat (limited to 'logic')
-rw-r--r--logic/shortcuts.cpp3
-rw-r--r--logic/win32-shortcuts.cpp5
-rw-r--r--logic/win32-shortcuts.h6
3 files changed, 5 insertions, 9 deletions
diff --git a/logic/shortcuts.cpp b/logic/shortcuts.cpp
index 125d051f..c72ed690 100644
--- a/logic/shortcuts.cpp
+++ b/logic/shortcuts.cpp
@@ -8,6 +8,7 @@
#include "shortcuts.h"
#include "win32-shortcuts.h"
+#include "compat/string-literal-operator.hpp"
#include <QString>
@@ -72,7 +73,7 @@ void Shortcuts::bind_shortcut(K &key, const key_opts& k, bool held)
if (code != Qt::Key_unknown)
win_key::from_qt(code, idx, mods);
- key.guid = QStringLiteral("");
+ key.guid = ""_qstr;
key.keycode = idx;
key.held = held;
key.ctrl = !!(mods & Qt::ControlModifier);
diff --git a/logic/win32-shortcuts.cpp b/logic/win32-shortcuts.cpp
index 901d2c0a..2099ce09 100644
--- a/logic/win32-shortcuts.cpp
+++ b/logic/win32-shortcuts.cpp
@@ -12,11 +12,10 @@
# include <dinput.h>
#include "win32-shortcuts.h"
-#include <QList>
#include <QVariant>
#include <QDebug>
-QList<win_key> windows_key_mods {
+win_key const windows_key_mods[] {
{DIK_LCONTROL, Qt::Key_Control},
{DIK_RCONTROL, Qt::Key_Control},
{DIK_LALT, Qt::Key_Alt},
@@ -27,7 +26,7 @@ QList<win_key> windows_key_mods {
{DIK_RWIN, Qt::Key_Super_R},
};
-QList<win_key> windows_key_sequences {
+static const win_key windows_key_sequences[] {
{ DIK_F1, Qt::Key_F1 },
{ DIK_F2, Qt::Key_F2 },
{ DIK_F3, Qt::Key_F3 },
diff --git a/logic/win32-shortcuts.h b/logic/win32-shortcuts.h
index 4e32c9ea..8cd6bdc9 100644
--- a/logic/win32-shortcuts.h
+++ b/logic/win32-shortcuts.h
@@ -2,14 +2,10 @@
#ifdef _WIN32
+#include <Qt>
#include <QKeySequence>
#include "shortcuts.h"
-struct win_key;
-
-extern QList<win_key> windows_key_mods;
-extern QList<win_key> windows_key_sequences;
-
#include "export.hpp"
struct OTR_LOGIC_EXPORT win_key