aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsglistview/tst_qsglistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qsglistview/tst_qsglistview.cpp')
-rw-r--r--tests/auto/declarative/qsglistview/tst_qsglistview.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/auto/declarative/qsglistview/tst_qsglistview.cpp b/tests/auto/declarative/qsglistview/tst_qsglistview.cpp
index 101f0fcbfd..6e8b247848 100644
--- a/tests/auto/declarative/qsglistview/tst_qsglistview.cpp
+++ b/tests/auto/declarative/qsglistview/tst_qsglistview.cpp
@@ -1953,19 +1953,12 @@ void tst_QSGListView::currentIndex()
// Test keys
canvas->show();
canvas->requestActivateWindow();
-#ifdef Q_WS_X11
- // to be safe and avoid failing setFocus with window managers
- qt_x11_wait_for_window_manager(canvas);
-#endif
-
- qApp->processEvents();
+ QTest::qWaitForWindowShown(canvas);
+ QTRY_VERIFY(qGuiApp->focusWindow() == canvas);
listview->setCurrentIndex(0);
QTest::keyClick(canvas, Qt::Key_Down);
-#ifdef QT_BUILD_INTERNAL
- QEXPECT_FAIL("", "QTBUG-21682 - Waiting for active window fails for developer build", Abort);
-#endif
QCOMPARE(listview->currentIndex(), 1);
QTest::keyClick(canvas, Qt::Key_Up);