aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2020-01-15 19:08:34 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2020-01-15 19:08:34 +0200
commit51a158929b55dffbdfb757da8bd6a2cd181906c6 (patch)
treed887ef986f357614624d65277f94d740c410be21 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
parent3a06d02197179240b8ea589534dc3416c75fc0f2 (diff)
parent3f8bcced6790059c279430ff34903c16bea25a98 (diff)
Merge 5.14 into 5.14.1v5.14.1
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 3976dbc0f0..3687c9416e 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -281,6 +281,7 @@ private slots:
void touchCancel();
void resizeAfterComponentComplete();
void moveObjectModelItemToAnotherObjectModel();
+ void changeModelAndDestroyTheOldOne();
private:
template <class T> void items(const QUrl &source);
@@ -9158,6 +9159,21 @@ void tst_QQuickListView::moveObjectModelItemToAnotherObjectModel()
QVERIFY(!QQuickItemPrivate::get(redRect)->culled);
}
+void tst_QQuickListView::changeModelAndDestroyTheOldOne() // QTBUG-80203
+{
+ QScopedPointer<QQuickView> window(createView());
+ window->setSource(testFileUrl("changeModelAndDestroyTheOldOne.qml"));
+ window->resize(640, 480);
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+
+ QQuickItem *root = window->rootObject();
+ QVERIFY(root);
+
+ QVERIFY(QQuickTest::qWaitForItemPolished(root));
+ // no crash
+}
+
QTEST_MAIN(tst_QQuickListView)
#include "tst_qquicklistview.moc"