diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-26 15:20:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-26 17:41:14 +0100 |
commit | af00d212755c2bf6e1542afc66eb706a869071c8 (patch) | |
tree | c14e225debfa6e6d51c7962e01f41fa5a63d3d94 | |
parent | c324edd5923a86548e385fa6f16361e1f085e4c4 (diff) |
Allow shortcut overrides.
When delivering shortcut events, make it possible
for the current active focus item to override the focus.
The use case is having an edit/copy menu (ctrl+c) and
a text edit. When the text edit is focused, it should
override the global shortcut.
Change-Id: Ide5b94832289c32762ef7304cdc94c107301d579
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 9acd24cae3..caf60dc30f 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1189,7 +1189,7 @@ void QQuickWindow::keyPressEvent(QKeyEvent *e) #ifndef QT_NO_SHORTCUT // Try looking for a Shortcut before sending key events - if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(this, e)) + if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(this->activeFocusItem(), e)) return; #endif |