diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 16:00:22 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 16:00:22 +0200 |
commit | 5e31cdc9dda940aee38cf8de4ddbbeb2c0cebfc7 (patch) | |
tree | 010b48a0a96c33852012f614043e6e881c1b2bf6 /tests/auto/controls/data/tst_action.qml | |
parent | 3a657dc092bea4d21f281368b0caad01e1aa6e32 (diff) | |
parent | edb18d6101e8bb9dd265330dbe019722181d7577 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl
Change-Id: I09434c9f6ff3112e4a8abe1bdf6036d789dfaabf
Diffstat (limited to 'tests/auto/controls/data/tst_action.qml')
-rw-r--r-- | tests/auto/controls/data/tst_action.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_action.qml b/tests/auto/controls/data/tst_action.qml index 0e41b7f3..7ed4aa11 100644 --- a/tests/auto/controls/data/tst_action.qml +++ b/tests/auto/controls/data/tst_action.qml @@ -194,4 +194,37 @@ TestCase { verify(container) compare(container.indirect.nativeText, container.direct.nativeText); } + + Component { + id: shortcutCleanup + Item { + property alias page: page + property alias action: action + property alias menu: menu + Item { + id: page + Action { + id: action + text: "action" + shortcut: "Insert" + } + Menu { + id: menu + MenuItem { action: action } + } + } + } + } + + function test_shortcutCleanup() { + { + var container = createTemporaryObject(shortcutCleanup, testCase); + verify(container) + container.action.shortcut = "Delete" + container.menu.open() + container.page.destroy() + tryVerify(function() { return !container.page }) + } + keyClick(Qt.Key_Delete, Qt.NoModifier) + } } |