summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-21 14:20:34 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-22 09:51:10 +0200
commit1b0e6b909f7d508f5c2eb0247ee3d6e5d0d5325c (patch)
treeac3342ae23524a28539ffcd85cf6fb7c14de0f0a /src
parent1e2325f0dc39df3c91b7d74c7837961a0e12884e (diff)
Windows QPA: Fix warnings about deprecated operator + for keys
Pick-to: 5.15 Change-Id: I48bd41465e62fef6f5ddcf235716a4be5eff46d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index c6569d3983..229e485e22 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -1255,7 +1255,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, MSG msg,
#ifndef QT_NO_SHORTCUT
// Is Qt interested in the context menu key?
if (modifiers == Qt::SHIFT && code == Qt::Key_F10
- && !QGuiApplicationPrivate::instance()->shortcutMap.hasShortcutForKeySequence(QKeySequence(Qt::SHIFT + Qt::Key_F10))) {
+ && !QGuiApplicationPrivate::instance()->shortcutMap.hasShortcutForKeySequence(QKeySequence(Qt::SHIFT | Qt::Key_F10))) {
return false;
}
#endif // !QT_NO_SHORTCUT
@@ -1376,7 +1376,7 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
quint32 baseKey = kbItem.qtKey[0];
Qt::KeyboardModifiers keyMods = e->modifiers();
if (baseKey == Qt::Key_Return && (e->nativeModifiers() & ExtendedKey)) {
- result << int(Qt::Key_Enter + keyMods);
+ result << int(Qt::Key_Enter | keyMods);
return result;
}
result << int(baseKey) + int(keyMods); // The base key is _always_ valid, of course