summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-09 00:38:03 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-09 00:38:03 (GMT)
commitc04a6e34b3d4da24d3cc26e192bebff2d3b79d19 (patch)
treee2a5299daa1e53668e7f9adeac002f8fdd286f8a /tests
parent51900441b77df5cb4755aaf2cba8351bbfe15e71 (diff)
parentdb0c932bf816b76547798ec62336e25b453d29b8 (diff)
downloadQt-c04a6e34b3d4da24d3cc26e192bebff2d3b79d19.zip
Qt-c04a6e34b3d4da24d3cc26e192bebff2d3b79d19.tar.gz
Qt-c04a6e34b3d4da24d3cc26e192bebff2d3b79d19.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp10
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp10
3 files changed, 15 insertions, 7 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
index 3f00e68..408ad87 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
@@ -10,7 +10,7 @@ Rectangle {
width: 100; height: 100
color: Qt.rgba(1,0,0)
Behavior on x {
- NumberAnimation { objectName: "MyAnim"; target: redRect; property: "y"; to: 300; repeat: true}
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; repeat: true}
}
}
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);
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 1df4448..75fbbf8 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -1028,13 +1028,17 @@ void tst_QDeclarativeListView::currentIndex()
QCOMPARE(listview->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);
- QEXPECT_FAIL("", "QTBUG-8475", Abort);
QCOMPARE(listview->currentIndex(), 1);
QTest::keyClick(canvas, Qt::Key_Up);