path: root/src/gui/kernel/qwindowsysteminterface.h
diff options
authorFrederik Gladhorn <>2015-07-14 18:31:03 +0200
committerFrederik Gladhorn <>2015-08-05 16:15:05 +0000
commit4067bbc24cf7a6d3058387225d9e67ad093991cd (patch)
tree2e9a6dae92d646d5b1e7050b9ddb4224ff2bf5f7 /src/gui/kernel/qwindowsysteminterface.h
parent771235285c5306dd385fbd0be64ab4120a916e1c (diff)
Fix shortcut handling with modifiers
Since d7ca800a87a2291c94c6580f0cfe068bb2280caf the shortcut events were only sent once. The one sent by QGuiApplication did not create a QKeyEvent with the full native modifier state - basically the extended key event expected everywhere. That means that shortcuts on some keyboard layouts - like ctrl-shift-7 on the German keyboard (resulting in ctrl+/) - would not work when the shortcut override was tested from QGuiApplication, but then the same shortcut was sent from QApplication with the full information, so it worked the second time. Shortcuts of this type in Qt Quick were broken before. Task-number: QTBUG-47062 Change-Id: I8390b9a96d0d998a2a538ac65503702e0d299cc7 Reviewed-by: Andy Shaw <> Reviewed-by: Gatis Paeglis <>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index c004fc6ef2..448c5d0893 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -78,6 +78,8 @@ public:
Qt::KeyboardModifiers mods = Qt::NoModifier,
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
+ static bool tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev);
static bool tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
const QString & text = QString(), bool autorep = false, ushort count = 1);
static bool tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,