From d90dfe05609d48dba8767576a3d00d638d6fffc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Lefebvre?= Date: Wed, 26 Mar 2025 15:36:01 +0100 Subject: [PATCH] Fix flaky tst_QWidget::synthMouseDoubleClick on Opensuse tst_QWidget::synthMouseDoubleClick is flaky on Opensuse. The touchEvent is not received when the test fails. The window's position/framePosition taken is the un-updated one as it is offset by the frame height. Verify that the window's position/framePosition have been updated before sending the touchEvent. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I32ccea55131d32f21288cfa64dbabf43deb8a8d3 Reviewed-by: Marc Mutz --- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 2ecfd262330..ba6c0bf2f8d 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -12486,6 +12486,8 @@ void tst_QWidget::synthMouseDoubleClick() widget.setWindowTitle(QLatin1String(QTest::currentTestFunction())); widget.show(); QWindow* window = widget.windowHandle(); + + QVERIFY(ensurePositionTopLeft(window)); QVERIFY(QTest::qWaitForWindowExposed(window)); // tap once; move slightly from press to release