diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-04-02 09:41:02 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-07 15:50:23 +0200 |
commit | 0a74379a57bcf68328ab167121c2dd16fc2d47c3 (patch) | |
tree | 04ca93f291bfcd2da84319202b4c073034f65054 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | |
parent | b50090e79b122c9de1560a99d1f8aebcc1e24a3a (diff) |
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 <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r-- | tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
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); |