diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-29 12:49:07 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-30 13:02:41 +0200 |
commit | 7779e6a05cde72320e47cf4d5ebed78b9e049226 (patch) | |
tree | 811c072c622b8f1e9cad5c883dd44b993549a5f3 /tests | |
parent | 71a057951c6ae679c9133261e332983f4b630cbf (diff) | |
download | qtlocation-7779e6a05cde72320e47cf4d5ebed78b9e049226.tar.gz |
Declare value types as structured values, remove workarounds
Use QML's new support for initializing structured values, adjust tests,
and remove the now unnecessary conversion functions.
Change-Id: I7007c9acb50f4a9532a9eed847b1b4dd0928ba34
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qmlinterface/data/TestContactDetail.qml | 7 | ||||
-rw-r--r-- | tests/auto/qmlinterface/data/TestPlaceAttribute.qml | 7 | ||||
-rw-r--r-- | tests/auto/qmlinterface/data/TestRatings.qml | 9 | ||||
-rw-r--r-- | tests/auto/qmlinterface/data/TestSupplier.qml | 11 | ||||
-rw-r--r-- | tests/auto/qmlinterface/data/TestUser.qml | 7 |
5 files changed, 18 insertions, 23 deletions
diff --git a/tests/auto/qmlinterface/data/TestContactDetail.qml b/tests/auto/qmlinterface/data/TestContactDetail.qml index c8f82870..3bee3ebb 100644 --- a/tests/auto/qmlinterface/data/TestContactDetail.qml +++ b/tests/auto/qmlinterface/data/TestContactDetail.qml @@ -30,9 +30,8 @@ import QtLocation import QtQuick Item { - property contactDetail contactDetail - contactDetail { - label: "Test Contact Detail" + property contactDetail contactDetail: ({ + label: "Test Contact Detail", value: "Test contact detail value" - } + }) } diff --git a/tests/auto/qmlinterface/data/TestPlaceAttribute.qml b/tests/auto/qmlinterface/data/TestPlaceAttribute.qml index cab47537..c3879cea 100644 --- a/tests/auto/qmlinterface/data/TestPlaceAttribute.qml +++ b/tests/auto/qmlinterface/data/TestPlaceAttribute.qml @@ -30,9 +30,8 @@ import QtLocation import QtQuick Item { - property placeAttribute attribute - attribute { - label: "Test Attribute" + property placeAttribute attribute: ({ + label: "Test Attribute", text: "Test attribute text" - } + }) } diff --git a/tests/auto/qmlinterface/data/TestRatings.qml b/tests/auto/qmlinterface/data/TestRatings.qml index 17f7d4f5..77f63a3f 100644 --- a/tests/auto/qmlinterface/data/TestRatings.qml +++ b/tests/auto/qmlinterface/data/TestRatings.qml @@ -30,10 +30,9 @@ import QtLocation import QtQuick Item { - property ratings ratings - ratings { - average: 3.5 - maximum: 5.0 + property ratings ratings: ({ + average: 3.5, + maximum: 5.0, count: 10 - } + }) } diff --git a/tests/auto/qmlinterface/data/TestSupplier.qml b/tests/auto/qmlinterface/data/TestSupplier.qml index f94f7f7b..1c5ef92b 100644 --- a/tests/auto/qmlinterface/data/TestSupplier.qml +++ b/tests/auto/qmlinterface/data/TestSupplier.qml @@ -30,11 +30,10 @@ import QtLocation import QtQuick Item { - property supplier supplier - supplier { - name: "Test supplier" - supplierId: "test-supplier-id" - url: "http://www.example.com/test-supplier" + property supplier supplier: ({ + name: "Test supplier", + supplierId: "test-supplier-id", + url: "http://www.example.com/test-supplier", icon: ({ parameters: { singleUrl: "http://www.example.com/test-icon.png" }}) - } + }) } diff --git a/tests/auto/qmlinterface/data/TestUser.qml b/tests/auto/qmlinterface/data/TestUser.qml index 137d87ed..48baad12 100644 --- a/tests/auto/qmlinterface/data/TestUser.qml +++ b/tests/auto/qmlinterface/data/TestUser.qml @@ -30,9 +30,8 @@ import QtQuick import QtLocation Item { - property user user - user { - name: "Test User" + property user user: ({ + name: "Test User", userId: "test-user-id" - } + }) } |