From abc60b14620253f61b0c0f1dff1ca0935b18761c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 29 Aug 2017 13:20:45 +0200 Subject: Fix a crash with ScrollView + TextArea TextArea was not cleaning up its geometry change listener on the Flickable it was attached to. Task-number: QTBUG-62292 Change-Id: I31223d4fcf0b46235b18e8eb05bab686a32f5481 Reviewed-by: Mitch Curtis --- tests/auto/controls/data/tst_textarea.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/auto/controls') diff --git a/tests/auto/controls/data/tst_textarea.qml b/tests/auto/controls/data/tst_textarea.qml index 0b68edc9..7c47aa25 100644 --- a/tests/auto/controls/data/tst_textarea.qml +++ b/tests/auto/controls/data/tst_textarea.qml @@ -449,4 +449,20 @@ TestCase { mouseClick(control, rect.x + rect.width / 2, rect.y + rect.height / 2) compare(control.selectedText, "Qt Quick Controls 2 TextArea") } + + Component { + id: scrollView + ScrollView { + TextArea { } + } + } + + function test_scrollView() { + var control = createTemporaryObject(scrollView, testCase) + verify(control) + + // don't crash (QTBUG-62292) + control.destroy() + wait(0) + } } -- cgit v1.2.3