diff --git a/autotests/kfileplacesviewtest.cpp b/autotests/kfileplacesviewtest.cpp --- a/autotests/kfileplacesviewtest.cpp +++ b/autotests/kfileplacesviewtest.cpp @@ -99,6 +99,7 @@ KFilePlacesView pv; pv.show(); + pv.activateWindow(); pv.setModel(new KFilePlacesModel()); QVERIFY(QTest::qWaitForWindowActive(&pv)); diff --git a/autotests/kfilewidgettest.cpp b/autotests/kfilewidgettest.cpp --- a/autotests/kfilewidgettest.cpp +++ b/autotests/kfilewidgettest.cpp @@ -66,6 +66,7 @@ { KFileWidget fw(QUrl::fromLocalFile(QDir::homePath())); fw.show(); + fw.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&fw)); QVERIFY(findLocationLabel(&fw)->hasFocus()); @@ -76,6 +77,7 @@ KFileWidget fw(QUrl::fromLocalFile(QDir::homePath())); fw.setUrl(QUrl::fromLocalFile(QDir::tempPath())); fw.show(); + fw.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&fw)); QVERIFY(findLocationLabel(&fw)->hasFocus()); @@ -85,6 +87,7 @@ { KFileWidget fw(QUrl::fromLocalFile(QDir::homePath())); fw.show(); + fw.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&fw)); fw.setUrl(QUrl::fromLocalFile(QDir::tempPath())); @@ -96,6 +99,7 @@ { KFileWidget fw(QUrl::fromLocalFile(QDir::homePath())); fw.show(); + fw.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&fw)); const QList nav = fw.findChildren(); @@ -156,6 +160,7 @@ KFileWidget fw(baseUrl); fw.show(); + fw.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&fw)); // WHEN @@ -202,6 +207,7 @@ const QUrl expectedBaseUrl = QUrl::fromLocalFile(expectedBaseDir); KFileWidget fw(baseUrl); fw.show(); + fw.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&fw)); // WHEN