aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-12-25 18:28:32 +0100
committerLiang Qi <liang.qi@qt.io>2016-12-25 18:35:38 +0100
commit9a272ad1854d744ea57296ba633b9d0dc19d1625 (patch)
tree096752ec339e18998517a4598f907e4b42b9403d /tests/auto
parent70c6b9639c53d2a530ccabd1395f561211c16fa4 (diff)
parentd8a052bc6b0349045db3d43a373b09cb16b41a48 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: tools/qmlimportscanner/main.cpp Change-Id: I01e17581f6691a03f83788773364d0cf96319514
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml12
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp2
-rw-r--r--tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml14
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp2
4 files changed, 28 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml b/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml
new file mode 100644
index 0000000000..868611760e
--- /dev/null
+++ b/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.7
+
+GridView {
+ width: 405
+ height: 200
+ cellWidth: width / 9
+ cellHeight: height / 2
+ // Ensure that the property is available in QML.
+ onKeyNavigationEnabledChanged: {}
+ model: 18
+ delegate: Rectangle { objectName: "delegate"; width: 10; height: 10; color: "green" }
+}
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index 07c03a57d7..1acc36c9b0 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -6568,7 +6568,7 @@ void tst_QQuickGridView::QTBUG_45640()
void tst_QQuickGridView::keyNavigationEnabled()
{
QScopedPointer<QQuickView> window(createView());
- window->setSource(testFileUrl("gridview4.qml"));
+ window->setSource(testFileUrl("keyNavigationEnabled.qml"));
window->show();
window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window.data()));
diff --git a/tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml b/tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml
new file mode 100644
index 0000000000..943b0aadbd
--- /dev/null
+++ b/tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.7
+
+ListView {
+ width: 400
+ height: 400
+ model: 100
+ // Ensure that the property is available in QML.
+ onKeyNavigationEnabledChanged: {}
+ delegate: Rectangle {
+ height: 40
+ width: 400
+ color: index % 2 ? "lightsteelblue" : "lightgray"
+ }
+}
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 61ba2caaf7..4816d9c341 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -8271,7 +8271,7 @@ void tst_QQuickListView::QTBUG_48044_currentItemNotVisibleAfterTransition()
void tst_QQuickListView::keyNavigationEnabled()
{
QScopedPointer<QQuickView> window(createView());
- window->setSource(testFileUrl("simplelistview.qml"));
+ window->setSource(testFileUrl("keyNavigationEnabled.qml"));
window->show();
window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window.data()));