diff options
| author | Frédéric Lefebvre <frederic.lefebvre@qt.io> | 2026-08-19 16:13:35 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2026-09-09 18:00:22 +0000 |
| commit | 1188b30ab2e171de67c3b2d83eb699d2c8b64367 (patch) | |
| tree | 3c320281e3653d306860c68d6b67f75903052fc3 | |
| parent | 61a33ca9cb17c12f66c3809ff19c2c81f26cbcde (diff) | |
Stabilize flaky tst_QQuickPopup::popupWindowPositioning6.11.3
tst_QQuickPopup::popupWindowPositioning is flaky on Ubuntu 24 and
openSuSE. With the Universal style, the popup may be positioned
incorrectly if the parent window has not yet finished being placed.
Explicitly set the window position and check it using ensurePositionTopLeft.
Fix flaky tst_QQuickPopup::popupWindowPositioning.
Pick-to: 6.8
Change-Id: I67860ed75d6b2b177662f38fb2f2cdffb8446b13
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 64e2b195ff09f2c75217a9e27ffab05e0a5318b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 24f37f6446e375a40c67402793f571873dcd6121)
| -rw-r--r-- | tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp b/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp index d44e9cd5c3..3ae6db8759 100644 --- a/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp +++ b/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtTest/qtest.h> +#include <QtTest/private/qtesthelpers_p.h> #include <QtTest/qsignalspy.h> #include <QtQuickTest/quicktest.h> @@ -2813,6 +2814,7 @@ void tst_QQuickPopup::popupWindowPositioning() QQuickWindow *window = helper.window; window->show(); QVERIFY(QTest::qWaitForWindowExposed(window)); + QVERIFY(QTestPrivate::ensurePositionTopLeft(window->handle()->window())); auto *popup = window->contentItem()->findChild<QQuickPopup *>(); QVERIFY(popup); |
