diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2020-01-15 19:08:34 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2020-01-15 19:08:34 +0200 |
commit | 51a158929b55dffbdfb757da8bd6a2cd181906c6 (patch) | |
tree | d887ef986f357614624d65277f94d740c410be21 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | |
parent | 3a06d02197179240b8ea589534dc3416c75fc0f2 (diff) | |
parent | 3f8bcced6790059c279430ff34903c16bea25a98 (diff) |
Merge 5.14 into 5.14.1v5.14.1
Change-Id: Iefb900b42cc0476e62342724a5f3a480c09ce354
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r-- | tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 16 |
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" |