aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-20 01:00:12 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-01-20 09:37:57 +0100
commit67ac9dead884c7558896bdd97e4d3152100dc7ec (patch)
tree000ef894b1f7d649b293cd08c2d8235f72201f19 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
parente5f7c5f2712957d0e1753c629e4cce86a0e6bdbc (diff)
parent953e04346773beb5d10c3758a12aae5c82646ae1 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/quick/items/qquickitemview.cpp Change-Id: Ib9faebdbef5eebb80f4e6aeb5b15b5df7494b157
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 e527853148..9a8dfee9d2 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -289,6 +289,7 @@ private slots:
void reuse_reuseIsOffByDefault();
void reuse_checkThatItemsAreReused();
void moveObjectModelItemToAnotherObjectModel();
+ void changeModelAndDestroyTheOldOne();
private:
template <class T> void items(const QUrl &source);
@@ -9415,6 +9416,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"