summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <[email protected]>2015-08-09 07:06:52 +0000
committerThe Qt Project <[email protected]>2015-08-09 07:06:52 +0000
commit5bfac9d653357c906946563b9494d7ae69cdad92 (patch)
tree0cc119af894a398497eba6f56fe2f224f6947616 /src/gui/kernel/qwindowsysteminterface.cpp
parentf08e1ecdc88e9373a31c1505d5db7f905431c644 (diff)
parent77da617dc8e378a631ee8c15b1b414f16b87f147 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 5877467830a..3ab2f59661d 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -227,6 +227,22 @@ bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp,
#endif
}
+bool QWindowSystemInterface::tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev)
+{
+#ifndef QT_NO_SHORTCUT
+ Q_ASSERT(ev->type() == QKeyEvent::ShortcutOverride);
+
+ QObject *focus = w->focusObject();
+ if (!focus)
+ focus = w;
+ return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, ev);
+#else
+ Q_UNUSED(w)
+ Q_UNUSED(ev)
+ return false;
+#endif
+}
+
// used by QTestLib to directly send shortcuts to objects
bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
const QString &text, bool autorep, ushort count)