diff options
Diffstat (limited to 'tests/auto/quick')
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST index 20f989fc50..92903955ac 100644 --- a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST +++ b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST @@ -1,5 +1,6 @@ [touchAndDragHandlerOnFlickable] windows gcc +opensuse-leap [touchDragFlickableBehindSlider] windows gcc [touchDragFlickableBehindButton] 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 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" 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 |