diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-08-06 16:07:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-06 18:26:47 +0200 |
commit | f1b9ba8c6ee6b991ef4e513bc4f39045fd55d1e6 (patch) | |
tree | cd587156a07344e98aca0cd1511075fe272bfec5 /tests/auto/quick/qquickpathview | |
parent | 27deff6d2b5a9eb1d98cd7b377ab934a35086664 (diff) | |
parent | 1d3b9db5b54d8ae99c6b149c8d3d91eda19b5838 (diff) |
Merge "Merge branch 'stable' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/quick/qquickpathview')
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index 274b93e81a..e4ad7b9c40 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -1725,6 +1725,14 @@ void tst_QQuickPathView::missingPercent() delete obj; } +static inline bool hasFraction(qreal o) +{ + const bool result = o != qFloor(o); + if (!result) + qDebug() << "o != qFloor(o)" << o; + return result; +} + void tst_QQuickPathView::cancelDrag() { QScopedPointer<QQuickView> window(createView()); @@ -1747,7 +1755,7 @@ void tst_QQuickPathView::cancelDrag() QTest::mouseMove(window.data(), QPoint(30, 100)); QTest::mouseMove(window.data(), QPoint(85, 100)); - QTRY_VERIFY(pathview->offset() != qFloor(pathview->offset())); + QTRY_VERIFY(hasFraction(pathview->offset())); QTRY_VERIFY(pathview->isMoving()); QVERIFY(pathview->isDragging()); QCOMPARE(draggingSpy.count(), 1); |