diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-05 00:23:23 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-05 15:15:34 +0100 |
commit | 5bfe13b64f46d7b737769154ca1c3fd85e627c05 (patch) | |
tree | 43322ca2cb90395eb414a35e239a3c41a69efc10 /src/quick | |
parent | 425403d062bad165629b1420be96ab42c20c28c7 (diff) |
Fix crash for keypress without active focus.
If there was no active focus item
we need to use tryShortcutEvent with
the window as target.
Change-Id: I420925781bbbda79fe2a62a5774230ae77c2cd34
Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/quick')
-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 2e8f58b849..2e717a9bf0 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1194,7 +1194,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->activeFocusItem(), e)) + if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focusObject(), e)) return; #endif |