From 0a74379a57bcf68328ab167121c2dd16fc2d47c3 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 2 Apr 2014 09:41:02 +0200 Subject: OSX: fix QQuickListView test outsideViewportChangeNotAffectingView was failing on OSX. Make the window larger; flick a longer distance in the same time to ensure that the flick takes the list to the end. Task-number: QTBUG-37828 Task-number: QTBUG-27740 Change-Id: Iefa44942a8f8318861781db820e830b459114a83 Reviewed-by: J-P Nurmi --- tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp') 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(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 object(component.create()); + QScopedPointer window(createView()); + window->setSource(testFileUrl("HighlightResize.qml")); + window->show(); + QVERIFY(QTest::qWaitForWindowExposed(window.data())); - QQuickListView *listview = qobject_cast(object.data()); + QQuickListView *listview = qobject_cast(window->rootObject()); QVERIFY(listview); QCOMPARE(listview->count(), 5); -- cgit v1.2.3