summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-08 07:17:15 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-08 07:17:15 (GMT)
commit9b06c2dd119f3c4442f7b26756728bb9c7fefb4a (patch)
tree8f02caf1d949a8159a985515435fd1159c0792ac /tests
parent4d8214afabd5e093c02b0de0e72f24139af6660f (diff)
downloadQt-9b06c2dd119f3c4442f7b26756728bb9c7fefb4a.zip
Qt-9b06c2dd119f3c4442f7b26756728bb9c7fefb4a.tar.gz
Qt-9b06c2dd119f3c4442f7b26756728bb9c7fefb4a.tar.bz2
clearFocus() before setParentItem(0) on an item with focus.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 7ade309..aeefea1 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -659,9 +659,14 @@ void tst_QDeclarativeGridView::currentIndex()
QCOMPARE(gridview->contentY(), 0.0);
// Test keys
- qApp->setActiveWindow(canvas);
canvas->show();
- canvas->setFocus();
+ qApp->setActiveWindow(canvas);
+#ifdef Q_WS_X11
+ // to be safe and avoid failing setFocus with window managers
+ qt_x11_wait_for_window_manager(canvas);
+#endif
+ QVERIFY(canvas->hasFocus());
+ QVERIFY(canvas->scene()->hasFocus());
qApp->processEvents();
QTest::keyClick(canvas, Qt::Key_Down);
@@ -672,7 +677,6 @@ void tst_QDeclarativeGridView::currentIndex()
gridview->setFlow(QDeclarativeGridView::TopToBottom);
- QEXPECT_FAIL("", "QTBUG-8475", Abort);
QTest::keyClick(canvas, Qt::Key_Right);
QCOMPARE(gridview->currentIndex(), 5);