From 6363bc8bfebdedad9f4b871f99c23c9b7b0e8bc7 Mon Sep 17 00:00:00 2001 From: Igor Bugaev Date: Wed, 7 Jul 2021 22:31:20 +0300 Subject: Stabilize tst_QQuickDrawer::Windows::slider(mouse) Need to wait before and after mousePress for some reason Pick-to: 6.2 Change-Id: I34a82341dee48492bb4215ee86887ccfc6afbec0 Reviewed-by: Shawn Rutledge --- tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp index 043ddc5a..57393d7a 100644 --- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp +++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp @@ -1305,11 +1305,15 @@ void tst_QQuickDrawer::slider() const QPoint from(slider->width() - 1, y); const QPoint to(1, y); + QTest::qWait(1); + if (mouse) QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, from); else QTest::touchEvent(window, touchDevice.data()).press(0, from); + QTest::qWait(1); + int distance = qAbs(from.x() - to.x()); for (int dx = delta; dx <= distance; dx += delta) { if (mouse) -- cgit v1.2.3