diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-19 14:16:51 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-19 14:26:34 +0000 |
commit | 02d1126499c2efd58fdcdde970d0713940230c58 (patch) | |
tree | 5a826f84d461ee80358c0f8afd078ec90f970f84 /tests/auto/controls/data/tst_popup.qml | |
parent | ccc482a2de8710a548c080e441e0658ae50fcb2e (diff) |
Close parentless popups
A parentless popup is not visible anywhere, and is not even associated
to a QML engine. Attempting to execute transitions would crash.
Make sure to remove any event filters (when using a plain QML Window,
like with QML TestCase) when a popup is made parentless. This ensures
that if the global shared tooltip was shown on an item that was
destroyed, the tooltip won't keep interfering with the window where
it was last shown.
Change-Id: I87bf9f8dda2fbcc5d1b83d1b83a66a6b9e718eb6
Task-number: QTBUG-55347
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_popup.qml')
-rw-r--r-- | tests/auto/controls/data/tst_popup.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml index ecdd1bf2..72cd6999 100644 --- a/tests/auto/controls/data/tst_popup.qml +++ b/tests/auto/controls/data/tst_popup.qml @@ -952,13 +952,17 @@ TestCase { control.destroy() } - // QTBUG-51989 function test_visible() { var control = popupTemplate.createObject(testCase, {visible: true}) verify(control) + // QTBUG-51989 tryCompare(control, "visible", true) + // QTBUG-55347 + control.parent = null + verify(!control.visible) + control.destroy() } |