aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-09-13 12:42:12 +0200
committerMitch Curtis <mitch.curtis@qt.io>2016-09-15 13:20:42 +0000
commit5149aa68eca6ede8836ec4f07a14d22d9da9b161 (patch)
tree3e3595842ac5c31f26fc5723ada8d079ae7ecc54 /tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
parenta3da23d5a92ab0f9b8280b9ed591986f8ac6a2d6 (diff)
Fix crash on exit when using default property aliases with layouts
The layout was being destroyed before the text, which meant that the removeItemChangeListener() call never got hit. To ensure that the listener is always removed, loop through each child in QQuickLayout's destructor. This is a manual cherry-pick of 59c6c0e0b1b5b46747595a58e11311b7393d7e70. Task-number: QTBUG-51927 Change-Id: I669f42beb8c3dd6b4b741cae0b16e017bb3409df Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml')
-rw-r--r--tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
index 33b8fd0e4e..2d4e227a9e 100644
--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
@@ -926,5 +926,17 @@ Item {
waitForRendering(layout)
layout.destroy()
}
+
+
+ function test_defaultPropertyAliasCrash() {
+ var containerUserComponent = Qt.createComponent("rowlayout/ContainerUser.qml");
+ compare(containerUserComponent.status, Component.Ready);
+
+ var containerUser = containerUserComponent.createObject(testCase);
+ verify(containerUser);
+
+ // Shouldn't crash.
+ containerUser.destroy();
+ }
}
}