From 1a7f6925ab7e77bd3ae75caa8aead8e1e16d8833 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 24 Jul 2024 13:27:15 +0200 Subject: [PATCH] tests: use qWaitForWindowFocused() instead of qWaitForWindowActive() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This depends on 9eb06a2848257d054447777c645231afa87429c2 . Done-with: Inho Lee Task-number: QTBUG-107157 Pick-to: 6.7 Change-Id: I9f4521c27ebc847596a94eed0c9116d71905def2 Reviewed-by: Tor Arne Vestbø (cherry picked from commit bc7821764b4d50fbb4e0ca1b84f85980ce15eeb0) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index ceff4b29c79..984072fbdbf 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -2458,8 +2458,8 @@ void tst_QWidget::tabOrderWithProxyDisabled() container.show(); container.activateWindow(); - if (!QTest::qWaitForWindowActive(&container)) - QSKIP("Window failed to activate, skipping test"); + if (!QTest::qWaitForWindowFocused(&container)) + QSKIP("Window failed to activate and be focused, skipping test"); QVERIFY2(lineEdit1.hasFocus(), qPrintable(focusWidgetName())); @@ -2629,8 +2629,8 @@ void tst_QWidget::tabOrderWithProxyOutOfOrder() container.show(); container.activateWindow(); - if (!QTest::qWaitForWindowActive(&container)) - QSKIP("Window failed to activate, skipping test"); + if (!QTest::qWaitForWindowFocused(&container)) + QSKIP("Window failed to activate and be focused, skipping test"); QCOMPARE(QApplication::focusWidget(), &outsideButton); container.tab(); @@ -2786,8 +2786,8 @@ void tst_QWidget::tabOrderWithCompoundWidgetsNoFocusPolicy() container.show(); container.activateWindow(); - if (!QTest::qWaitForWindowActive(&container)) - QSKIP("Window failed to activate, skipping test"); + if (!QTest::qWaitForWindowFocused(&container)) + QSKIP("Window failed to activate and be focused, skipping test"); QVERIFY2(spinbox1.hasFocus(), qPrintable(focusWidgetName()));