From: Frederik Gladhorn Date: Mon, 14 Jan 2013 09:22:12 +0000 (+0100) Subject: Filter key press events through shortcut map. X-Git-Tag: upstream/5.2.1~950 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0721eb1ea53e6238cf8555424c2e3464ac3db0f6;p=platform%2Fupstream%2Fqtdeclarative.git Filter key press events through shortcut map. This allows QQuickItems to use shortcuts. Change-Id: I068109a954d92e4e7bd5e63d2b3523b66855c60a Reviewed-by: Gabriel de Dietrich --- diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 2cde3cc..eb3a74f 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1166,6 +1166,12 @@ void QQuickWindow::keyPressEvent(QKeyEvent *e) { Q_D(QQuickWindow); +#ifndef QT_NO_SHORTCUT + // Try looking for a Shortcut before sending key events + if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(this, e)) + return; +#endif + if (d->activeFocusItem) sendEvent(d->activeFocusItem, e); }