aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-03-21 10:01:22 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-03-22 08:58:25 +0100
commitd8641f04e4350755e5264e55730392730ab7c9ee (patch)
treef60a13ab5d8a2b2374bdf28f50eaa272e25b0208 /src/qt/guiutil.cpp
parent91d12344b1e51809c1ef6b630b631a6da00267c3 (diff)
qt: Use human-readable strings in preference to hard-coded integers
This is recommended by Qt docs. See: https://doc.qt.io/qt-5/qkeysequence.html#details Also this change avoids -Wdeprecated-enum-enum-conversion warnings.
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 3108c93d7c..362601b512 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -47,6 +47,7 @@
#include <QGuiApplication>
#include <QJsonObject>
#include <QKeyEvent>
+#include <QKeySequence>
#include <QLatin1String>
#include <QLineEdit>
#include <QList>
@@ -414,7 +415,7 @@ void bringToFront(QWidget* w)
void handleCloseWindowShortcut(QWidget* w)
{
- QObject::connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), w), &QShortcut::activated, w, &QWidget::close);
+ QObject::connect(new QShortcut(QKeySequence(QObject::tr("Ctrl+W")), w), &QShortcut::activated, w, &QWidget::close);
}
void openDebugLogfile()