aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-08-23 13:35:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-26 10:21:56 +0200
commit6ba7d88df623df5bce85bfdae853fc49006e76f2 (patch)
tree64de42db0f026a55b684ea787999a2e8c95762d6 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
parentcf3537e99c75d3bb92b9d4ed6f4d437e316dcf01 (diff)
Stabilize tests using utilities from QQuickViewTestUtil.
Change QQuickViewTestUtil::createView() to center the window on the screen to avoid taskbar areas. Add routine to move the mouse away and use that in tests using QQuickViewTestUtil::flick() and other mouse interaction since the mouse cursor can interfere with it. Affected tests: qquickgridview, qquickpathview, qquickflickable, qquicklistview, qquickrepeater and qquickpositioners. Task-number: QTBUG-33017 Change-Id: I540c0efb54a231dcb44c8fd5ad9573a2d4d4b9df Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index cd8cc53b40..41f193cdb7 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -2127,6 +2127,7 @@ void tst_QQuickListView::sectionsDragOutsideBounds()
QFETCH(int, cacheBuffer);
QQuickView *window = getView();
+ QQuickViewTestUtil::moveMouseAway(window);
QaimModel model;
for (int i = 0; i < 10; i++)
@@ -4819,6 +4820,7 @@ void tst_QQuickListView::marginsResize()
QQuickView *window = getView();
window->setSource(testFileUrl("margins2.qml"));
+ QQuickViewTestUtil::moveMouseAway(window);
window->show();
qApp->processEvents();
@@ -4954,6 +4956,7 @@ void tst_QQuickListView::snapToItem()
QFETCH(qreal, startExtent);
QQuickView *window = getView();
+ QQuickViewTestUtil::moveMouseAway(window);
window->setSource(testFileUrl("snapToItem.qml"));
window->show();
@@ -5282,6 +5285,7 @@ void tst_QQuickListView::snapOneItem()
QFETCH(qreal, startExtent);
QQuickView *window = getView();
+ QQuickViewTestUtil::moveMouseAway(window);
window->setSource(testFileUrl("snapOneItem.qml"));
window->show();
@@ -6754,6 +6758,7 @@ void tst_QQuickListView::matchItemLists(const QVariantList &itemLists, const QLi
void tst_QQuickListView::flickBeyondBounds()
{
QQuickView *window = createView();
+ QQuickViewTestUtil::moveMouseAway(window);
window->setSource(testFileUrl("flickBeyondBoundsBug.qml"));
window->show();
@@ -6889,6 +6894,7 @@ void tst_QQuickListView::delayedChanges_QTBUG_30555()
void tst_QQuickListView::outsideViewportChangeNotAffectingView()
{
QQuickView *window = createView();
+ QQuickViewTestUtil::moveMouseAway(window);
window->setSource(testFileUrl("outsideViewportChangeNotAffectingView.qml"));
QQuickListView *listview = window->rootObject()->findChild<QQuickListView*>();