aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-01-26 11:46:56 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-01-26 11:46:56 +0100
commit9225ac7348c9023093b6ef8d4519087c7dddeaa2 (patch)
tree4660e25bd5cfd4a2a40b0ad97ea689c4acb22a8c /tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
parent9d8fe2ac121162c15be6728495be2235b728325a (diff)
parent0076c44d3993f377ad6417d3bb08109b608dfbd2 (diff)
Merge remote-tracking branch 'origin/dev' into wip/pointerhandler
Diffstat (limited to 'tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml')
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
index 2d4e227a9e..97860458fe 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
@@ -802,6 +802,27 @@ Item {
layout.destroy() // Do not crash
}
+ Component {
+ id: rectangle_Component
+ Rectangle {
+ width: 100
+ height: 50
+ }
+ }
+
+ function test_destroyImplicitInvisibleLayout()
+ {
+ var root = rectangle_Component.createObject(container)
+ root.visible = false
+ var layout = layout_deleteLayout.createObject(root)
+ layout.visible = true
+ // at this point the layout is still invisible because root is invisible
+ layout.destroy()
+ // Do not crash when destructing the layout
+ waitForRendering(container) // should ideally call gc(), but does not work
+ root.destroy()
+ }
+
function test_sizeHintWithHiddenChildren(data) {
var layout = layout_sizeHint_Component.createObject(container)
var grid = layout.children[0]