aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-05-16 15:46:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-05-16 13:57:45 +0000
commit1427b243cb69768e7ce2e6ea3ad75619deac104b (patch)
tree6ae219fa30f425bdf955027a557ca7a0ea4d3e52 /tests
parentc49bb5bda32477a878b6b82b99f853cef1340890 (diff)
Don't unnecessarily transform keysequences into strings
Otherwise we cannot interpret them as the original key sequence anymore. When passing them on they are interpreted as the number key that represents the numeric value of the key sequence enum. Change-Id: Idd94ef95bc693cb6d51162dd1994adc953b52e25 Fixes: QTBUG-75572 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_action.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_action.qml b/tests/auto/controls/data/tst_action.qml
index ef28c0e5..0e41b7f3 100644
--- a/tests/auto/controls/data/tst_action.qml
+++ b/tests/auto/controls/data/tst_action.qml
@@ -165,4 +165,33 @@ TestCase {
keyClick(Qt.Key_A, Qt.ControlModifier)
compare(spy.count, 1)
}
+
+ Component {
+ id: shortcutBinding
+ Item {
+ Action {
+ id: action
+ shortcut: StandardKey.Copy
+ }
+
+ Shortcut {
+ id: indirectShortcut
+ sequence: action.shortcut
+ }
+
+ Shortcut {
+ id: directShortcut
+ sequence: StandardKey.Copy
+ }
+
+ property alias indirect: indirectShortcut;
+ property alias direct: directShortcut
+ }
+ }
+
+ function test_shortcutBinding() {
+ var container = createTemporaryObject(shortcutBinding, testCase);
+ verify(container)
+ compare(container.indirect.nativeText, container.direct.nativeText);
+ }
}