diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-21 01:00:14 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-21 01:00:14 +0100 |
commit | 9aceff567c859bb91fe7221d2265953437402b43 (patch) | |
tree | 9db253bae3d91b77c9b6727afed121b7d7cac065 /tests/auto | |
parent | 4ecc36c34154e731cb2e94fa1a35929d6785f33d (diff) | |
parent | cc9e1326792835c846cd129b683db5af6ac931bb (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ic2cea85917751b89c34768fd80d8b11f5706dd62
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/qquicklistview/data/changeModelAndDestroyTheOldOne.qml | 34 | ||||
-rw-r--r-- | tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 16 | ||||
-rw-r--r-- | tests/auto/quick/touchmouse/BLACKLIST | 4 |
3 files changed, 54 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/data/changeModelAndDestroyTheOldOne.qml b/tests/auto/quick/qquicklistview/data/changeModelAndDestroyTheOldOne.qml new file mode 100644 index 0000000000..6a33decde6 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/changeModelAndDestroyTheOldOne.qml @@ -0,0 +1,34 @@ +import QtQuick 2.13 +import QtQml 2.13 +import QtQml.Models 2.13 + +Rectangle { + width: 640 + height: 480 + property var model1: null + property var model2: null + Component { + id: m1 + ObjectModel { + Rectangle { height: 30; width: 80; color: "red" } + Rectangle { height: 30; width: 80; color: "green" } + Rectangle { height: 30; width: 80; color: "blue" } + } + } + Component { + id: m2 + ObjectModel { + Rectangle { height: 30; width: 80; color: "red" } + } + } + ListView { + anchors.fill: parent + Component.onCompleted: { + model1 = m1.createObject() + model = model1 + model2 = m2.createObject() + model = model2 + model1.destroy() + } + } +} 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" diff --git a/tests/auto/quick/touchmouse/BLACKLIST b/tests/auto/quick/touchmouse/BLACKLIST index 0dfe28087a..9afc86c2fe 100644 --- a/tests/auto/quick/touchmouse/BLACKLIST +++ b/tests/auto/quick/touchmouse/BLACKLIST @@ -4,3 +4,7 @@ windows gcc developer-build # QTBUG-74517 [buttonOnFlickable] windows gcc developer-build + +# QTBUG-74517 +[touchButtonOnFlickable] +windows gcc developer-build |