diff options
3 files changed, 16 insertions, 13 deletions
diff --git a/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml b/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml index 7903c392d1..c57cde5eda 100644 --- a/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml +++ b/tests/auto/quick/qquicklistview/data/outsideViewportChangeNotAffectingView.qml @@ -42,13 +42,16 @@ import QtQuick 2.1 import QtTest 1.0 Item { + width: 300 + height: 542 + function resizeThirdItem(size) { resizingListModel.setProperty(3, "size", size) } ListView { - width: 300 - height: 542 + id: list + anchors.fill: parent model: ListModel { id: resizingListModel ListElement { size: 300; } @@ -62,6 +65,9 @@ Item { width: parent.width color: index % 2 == 0 ? "red" : "blue" height: size + Text { anchors.centerIn: parent; text: index } } } + + Text { text: list.contentY; color: "white" } } diff --git a/tests/auto/quick/qquicklistview/qquicklistview.pro b/tests/auto/quick/qquicklistview/qquicklistview.pro index 4ac47679da..2ae04d32fe 100644 --- a/tests/auto/quick/qquicklistview/qquicklistview.pro +++ b/tests/auto/quick/qquicklistview/qquicklistview.pro @@ -17,4 +17,3 @@ TESTDATA = data/* QT += core-private gui-private qml-private quick-private testlib DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 -mac:CONFIG += insignificant_test # QTBUG-27740 diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 60c2fadb23..288c0d0a58 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -3347,9 +3347,9 @@ void tst_QQuickListView::modelChanges() void tst_QQuickListView::QTBUG_9791() { QQuickView *window = createView(); - window->setSource(testFileUrl("strictlyenforcerange.qml")); - qApp->processEvents(); + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window)); QQuickListView *listview = qobject_cast<QQuickListView*>(window->rootObject()); QTRY_VERIFY(listview != 0); @@ -7047,9 +7047,7 @@ void tst_QQuickListView::outsideViewportChangeNotAffectingView() window->show(); QVERIFY(QTest::qWaitForWindowExposed(window)); - flick(window, QPoint(20, 200), QPoint(20, 20), 10); - - QTRY_COMPARE(listview->isFlicking(), false); + listview->setContentY(1250); QTRY_COMPARE(listview->indexAt(0, listview->contentY()), 4); QTRY_COMPARE(listview->itemAt(0, listview->contentY())->y(), 1200.); @@ -7147,12 +7145,12 @@ void tst_QQuickListView::displayMargin() void tst_QQuickListView::highlightItemGeometryChanges() { - QQmlEngine engine; - QQmlComponent component(&engine, testFileUrl("HighlightResize.qml")); - - QScopedPointer<QObject> object(component.create()); + QScopedPointer<QQuickView> window(createView()); + window->setSource(testFileUrl("HighlightResize.qml")); + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window.data())); - QQuickListView *listview = qobject_cast<QQuickListView *>(object.data()); + QQuickListView *listview = qobject_cast<QQuickListView *>(window->rootObject()); QVERIFY(listview); QCOMPARE(listview->count(), 5); |