aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathview
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-05-14 12:49:52 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-14 05:37:29 +0200
commit9575a325c2abce55c7fb2c33c916252790f00352 (patch)
treed3a5cf9eaa61c3ddbf371660da8e9b4d5932c5a7 /tests/auto/quick/qquickpathview
parentf2502e261155685ac7a4a2ec085c4524e23db278 (diff)
PathView was moving view too soon on drag
In order to allow gesture grabbing to work correctly, the view shouldn't react to a drag until the event after the one that triggered it. Change-Id: I3b84e501aa0f82da821498fa26abe8bbf66a6252 Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickpathview')
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index fbe96bf672..057eb2cb64 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -1231,10 +1231,15 @@ void tst_QQuickPathView::mouseDrag()
QMouseEvent mv(QEvent::MouseMove, QPoint(30,100), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
QGuiApplication::sendEvent(canvas, &mv);
}
+ // first move beyond threshold does not trigger drag
+ QVERIFY(!pathview->isMoving());
+
{
QMouseEvent mv(QEvent::MouseMove, QPoint(90,100), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
QGuiApplication::sendEvent(canvas, &mv);
}
+ // next move beyond threshold does trigger drag
+ QVERIFY(pathview->isMoving());
QVERIFY(pathview->currentIndex() != current);