aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-21 22:10:39 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-01 12:59:45 +0000
commitb31b4094e1728d839fef30f5128c81451ea75e4a (patch)
treed7288c7a964a1fb9f45612e9e4b98c40dc2b1a73 /tests/auto
parent281469e947e6b09a44c296a26db474db815f6238 (diff)
QQuickPopup: use QShortcutMap to grab Back & Escape keys
This makes CloseOnEscape play well together with QML Shortcut, as illustrated by the Gallery example. For example, navigate to any control page, open the options menu, and hit escape twice. First, the options menu closes, and then the stackview navigates back. Another nice example is to open the style combobox in the settings dialog, while being navigated to one of the control pages, and hit escape three times. First, the combobox closes, then the settings dialog closes, and finally, the stackview navigates back. NOTE: tst_combobox had to be updated, because it was assuming that the popup is closed when escape is released. Now that the system is based on shortcut overrides, it gets closed on press instead. Task-number: QTBUG-56562 Change-Id: I8b8901bcba7deebd82b181af42f335d95a7cb469 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_combobox.qml1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index 97ba7ea4..7d7e519f 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -467,7 +467,6 @@ TestCase {
// hide popup
keyPress(data.key2)
compare(control.pressed, data.hidePress)
- compare(control.popup.visible, data.showPopup)
keyRelease(data.key2)
compare(control.pressed, false)
tryCompare(control.popup, "visible", !data.hidePopup)