aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickdrawer
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-10-15 13:51:20 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-10-15 13:55:22 +0200
commit6f617349cf865ca3a7befc0dd472b7c2510fc431 (patch)
tree37e70da54a7f3101b82551ccd98508f8d9d64330 /tests/auto/qquickdrawer
parent718e08392f34dc478ea010c08a4b9c77bb665dfc (diff)
parent8e2d1b1efe736760d27af17160f662454546b054 (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Removed dependencies.yaml. Change-Id: I1e2b3f486e9ace4bc8dc0419a64848990b3a6b39
Diffstat (limited to 'tests/auto/qquickdrawer')
-rw-r--r--tests/auto/qquickdrawer/tst_qquickdrawer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
index 816f9b67..7644cacf 100644
--- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
+++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
@@ -350,7 +350,8 @@ void tst_QQuickDrawer::position()
QVERIFY(drawer);
drawer->setEdge(edge);
- QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, press);
+ // Give it some time (50 ms) before the press to avoid flakiness on OpenSUSE: QTBUG-77946
+ QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, press, 50);
QTest::mouseMove(window, from);
QTest::mouseMove(window, to);
QCOMPARE(drawer->position(), position);
@@ -403,7 +404,8 @@ void tst_QQuickDrawer::dragMargin()
int leftX = qMax<int>(0, dragMargin);
int leftDistance = startDragDistance + drawer->width() * 0.45;
QVERIFY(leftDistance > QGuiApplication::styleHints()->startDragDistance());
- QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(leftX, drawer->height() / 2));
+ // Give it some time (50 ms) before the press to avoid flakiness on OpenSUSE: QTBUG-77946
+ QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(leftX, drawer->height() / 2), 50);
QTest::mouseMove(window, QPoint(leftX + startDragDistance, drawer->height() / 2));
QTest::mouseMove(window, QPoint(leftX + leftDistance, drawer->height() / 2));
QCOMPARE(drawer->position(), dragFromLeft);
@@ -613,7 +615,9 @@ void tst_QQuickDrawer::wheel_data()
static bool sendWheelEvent(QQuickItem *item, const QPoint &localPos, int degrees)
{
QQuickWindow *window = item->window();
- QWheelEvent wheelEvent(localPos, item->window()->mapToGlobal(localPos), QPoint(0, 0), QPoint(0, 8 * degrees), 0, Qt::Vertical, Qt::NoButton, 0);
+ QWheelEvent wheelEvent(localPos, item->window()->mapToGlobal(localPos), QPoint(0, 0),
+ QPoint(0, 8 * degrees), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase,
+ false);
QSpontaneKeyEvent::setSpontaneous(&wheelEvent);
return qGuiApp->notify(window, &wheelEvent);
}