Fix flaky tst_QWindow::testInputEvents on openSuSE 15.6

tst_QWindow::testInputEvents is flaky on openSUSE where a simulated
mouse click is performed before the window is exposed and active.

Verify that the window is exposed and active at start of function.

Fix flakiness on openSuSE 15.6

Pick-to: 6.10
Change-Id: I71e79b09d805ea3c15a558fed4693671bdc2a56d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Frédéric Lefebvre 2025-05-22 12:40:18 +02:00 committed by Axel Spoerl
parent abe8cf377c
commit 12508de6d3
1 changed files with 1 additions and 1 deletions

View File

@ -1230,7 +1230,7 @@ void tst_QWindow::testInputEvents()
InputTestWindow window;
window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize));
window.showNormal();
QVERIFY(QTest::qWaitForWindowExposed(&window));
QTRY_VERIFY(window.isActive());
QTest::keyClick(&window, Qt::Key_A, Qt::NoModifier);
QCoreApplication::processEvents();