diff options
Diffstat (limited to 'tests/auto/qfiledialog/tst_qfiledialog.cpp')
-rw-r--r-- | tests/auto/qfiledialog/tst_qfiledialog.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 18875e7..d6225cd 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -1039,7 +1039,10 @@ void tst_QFiledialog::focus() QNonNativeFileDialog fd; fd.setDirectory(QDir::currentPath()); fd.show(); + QApplication::setActiveWindow(&fd); + QTest::qWaitForWindowShown(&fd); QTRY_COMPARE(fd.isVisible(), true); + QTRY_COMPARE(QApplication::activeWindow(), &fd); qApp->processEvents(); // make sure the tests work with focus follows mouse |