From 625ce7ab513634b8f0b03b29524f2adb464aab00 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 Change-Id: I34a82341dee48492bb4215ee86887ccfc6afbec0 Reviewed-by: Shawn Rutledge (cherry picked from commit 6363bc8bfebdedad9f4b871f99c23c9b7b0e8bc7) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp index 043ddc5ad2..57393d7a6e 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