aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2021-05-21 14:17:03 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-26 08:14:00 +0000
commitf3377bd4d790fb07bdcac06ac9f803856fee07d9 (patch)
treeb0fe76c8fdfa0b659e88747465e12cbfe4cf5ea6 /tests
parent15acb33c0243c397fa986b38531a96a7cbc4f615 (diff)
TextArea: Detach the flickable when it is deleted
When the flickable is deleted before the TextArea is (which can happen when it is a child of a ScrollView) then we need to make sure that the TextArea no longer keeps a reference to the Flickable object. Fixes: QTBUG-93958 Change-Id: I1745065370718e60bc459192e15eae0e1ba36231 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 4cba29c38cb1b610bf896130050b6c14b7e10c71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_scrollview.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_scrollview.qml b/tests/auto/controls/data/tst_scrollview.qml
index 3e645ebf..0e8b0835 100644
--- a/tests/auto/controls/data/tst_scrollview.qml
+++ b/tests/auto/controls/data/tst_scrollview.qml
@@ -193,6 +193,15 @@ TestCase {
}
}
}
+ Component {
+ id: scrollableTextAreaWithSibling
+ ScrollView {
+ Item {
+ }
+ TextArea {
+ }
+ }
+ }
function test_scrollBars() {
var control = createTemporaryObject(scrollView, testCase, {width: 200, height: 200})
@@ -508,6 +517,12 @@ TestCase {
compare(control.contentHeight, flickable.contentHeight)
}
+ function test_textAreaWithSibling() {
+ // Checks that it does not crash when the ScrollView is deleted
+ var control = createTemporaryObject(scrollableTextAreaWithSibling, testCase)
+ verify(control)
+ }
+
Component {
id: zeroSizedContentItemComponent
ScrollView {