diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 16:00:07 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 16:00:07 +0200 |
commit | 19ed7973a311a8d42d3a558bb551230e902ce9b9 (patch) | |
tree | 9832c0cc796722f85579e25fd50cc38b65e6ef6c /tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp | |
parent | f5701f0def37fcc0c2b38ae9552eb3a896a34687 (diff) | |
parent | a5635345175e667601c8b6a344508c4d4ebb0f9d (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl
Change-Id: I91d2b178e7111d0802ea973bccf230b264c30c96
Diffstat (limited to 'tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp')
-rw-r--r-- | tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp b/tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp index f71febbaf9..40b138bc70 100644 --- a/tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp +++ b/tests/auto/quick/pointerhandlers/qquickdraghandler/tst_qquickdraghandler.cpp @@ -411,6 +411,9 @@ void tst_DragHandler::dragFromMargin() // QTBUG-74966 QVERIFY(!dragHandler->active()); QCOMPARE(dragHandler->centroid().scenePosition(), scenePressPos); QCOMPARE(dragHandler->centroid().scenePressPosition(), scenePressPos); +#if QT_CONFIG(cursor) + QCOMPARE(window->cursor().shape(), Qt::ArrowCursor); +#endif p1 += QPoint(dragThreshold * 2, 0); QTest::mouseMove(window, p1); QTRY_VERIFY(dragHandler->active()); @@ -419,9 +422,18 @@ void tst_DragHandler::dragFromMargin() // QTBUG-74966 QCOMPARE(dragHandler->translation().x(), 0.0); // hmm that's odd QCOMPARE(dragHandler->translation().y(), 0.0); QCOMPARE(draggableItem->position(), originalPos + QPointF(dragThreshold * 2, 0)); +#if QT_CONFIG(cursor) + // The cursor doesn't change until the next event after the handler becomes active. + p1 += QPoint(1, 0); + QTest::mouseMove(window, p1); + QTRY_COMPARE(window->cursor().shape(), Qt::ClosedHandCursor); +#endif QTest::mouseRelease(window, Qt::LeftButton, Qt::NoModifier, p1); QTRY_VERIFY(!dragHandler->active()); QCOMPARE(dragHandler->centroid().pressedButtons(), Qt::NoButton); +#if QT_CONFIG(cursor) + QTRY_COMPARE(window->cursor().shape(), Qt::ArrowCursor); +#endif } void tst_DragHandler::snapMode_data() |