aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlsettings/data/aliases.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-11 17:19:14 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-19 08:44:15 +0000
commit5f49b2b3bb30678a26341e1f45e0cfd6a6fd2c57 (patch)
tree401948a4e6ba81d01860da5f2e57150412e72128 /tests/auto/qml/qqmlsettings/data/aliases.qml
parent6a02fb09af8dce6ca533e816d2223e070b30f294 (diff)
QML Settings: fix JS array handling
Before Qt 5.4, JS arrays were passed as QVariantLists. Since Qt 5.4, they are passed as QJSValues instead. Use QJSValue::toVariant() (the same way as QQuickItemView::setModel(QVariant) which was fixed in cf959b4b) to convert JS values to QSettings-compatible variants. Task-number: QTBUG-45316 Change-Id: Icc6f8ad09bfef089d9efcf5b90e3783bb3f73a9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlsettings/data/aliases.qml')
-rw-r--r--tests/auto/qml/qqmlsettings/data/aliases.qml4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlsettings/data/aliases.qml b/tests/auto/qml/qqmlsettings/data/aliases.qml
index 18bd7a0e07..dd11147532 100644
--- a/tests/auto/qml/qqmlsettings/data/aliases.qml
+++ b/tests/auto/qml/qqmlsettings/data/aliases.qml
@@ -38,8 +38,10 @@ QtObject {
property double doubleProperty: 3.45
property string stringProperty: "foo"
property url urlProperty: "http://www.qt-project.org"
+ property var objectProperty: {"foo":"bar"}
property var intListProperty: [1, 2, 3]
property var stringListProperty: ["a", "b", "c"]
+ property var objectListProperty: [{"a":"b"}, {"c":"d"}]
property date dateProperty: "2000-01-02"
// QTBUG-32295: Expected property type
//property time timeProperty: "12:34:56"
@@ -58,8 +60,10 @@ QtObject {
property alias doubleProperty: root.doubleProperty
property alias stringProperty: root.stringProperty
property alias urlProperty: root.urlProperty
+ property alias objectProperty: root.objectProperty
property alias intListProperty: root.intListProperty
property alias stringListProperty: root.stringListProperty
+ property alias objectListProperty: root.objectListProperty
property alias dateProperty: root.dateProperty
// QTBUG-32295: Expected property type
//property alias timeProperty: root.timeProperty