From 6d0378ad9b91db04ca725b98d941d32871b19d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 2 May 2018 14:05:29 +0200 Subject: tst_qquicktext::hAlignImplicitWidth: wait for window exposed, not just active We're grabbing the window just after, so we need to wait for it to render something first. Change-Id: I11382f0a6344014e22fcf7473a2eed10c4301b2d Reviewed-by: Simon Hausmann --- tests/auto/quick/qquicktext/tst_qquicktext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index 5f346a6e0a..6b861af8a6 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -1004,7 +1004,7 @@ void tst_qquicktext::hAlignImplicitWidth() view.setFlags(view.flags() | Qt::WindowStaysOnTopHint); // Prevent being obscured by other windows. view.show(); view.requestActivate(); - QVERIFY(QTest::qWaitForWindowActive(&view)); + QVERIFY(QTest::qWaitForWindowExposed(&view)); QQuickText *text = view.rootObject()->findChild("textItem"); QVERIFY(text != nullptr); -- cgit v1.2.3