diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-08 17:26:52 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-14 13:19:51 +0200 |
commit | 1732bdf40518194d0ee5e0f009de3409dce6280d (patch) | |
tree | 0a724a0c9d340ab28796d5b3bd39f78d5b119ffb /tests | |
parent | 734799d9f88c2383be87806d4931799b6f6a843a (diff) | |
download | qtlocation-1732bdf40518194d0ee5e0f009de3409dce6280d.tar.gz |
Register QPlaceUser as a QML value type
Make QPlaceUser a gadget, and register it as a value type with the QML
engine. Remove declarative wrapper, and consolidate the documentation.
Adjust the tests, remove tests that test that the type is not a value.
Use grouped properties initialization syntax in QML for now.
Change-Id: I0c840911316590b7ba103e26fa99d824bb9e39c5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative_location_core/tst_user.qml | 23 | ||||
-rw-r--r-- | tests/auto/qmlinterface/data/TestUser.qml | 10 |
2 files changed, 10 insertions, 23 deletions
diff --git a/tests/auto/declarative_location_core/tst_user.qml b/tests/auto/declarative_location_core/tst_user.qml index abfad1b4..6ca12f7b 100644 --- a/tests/auto/declarative_location_core/tst_user.qml +++ b/tests/auto/declarative_location_core/tst_user.qml @@ -28,23 +28,21 @@ import QtTest import QtLocation -import "utils.js" as Utils TestCase { id: testCase name: "User" - User { id: emptyUser } + property user emptyUser function test_empty() { compare(emptyUser.userId, ""); compare(emptyUser.name, ""); } - User { - id: qmlUser - + property user qmlUser + qmlUser { userId: "testuser" name: "Test User" } @@ -53,19 +51,4 @@ TestCase { compare(qmlUser.userId, "testuser"); compare(qmlUser.name, "Test User"); } - - User { - id: testUser - } - - function test_setAndGet_data() { - return [ - { tag: "userId", property: "userId", signal: "userIdChanged", value: "testuser", reset: "" }, - { tag: "name", property: "name", signal: "nameChanged", value: "Test User", reset: "" }, - ]; - } - - function test_setAndGet(data) { - Utils.testObjectProperties(testCase, testUser, data); - } } diff --git a/tests/auto/qmlinterface/data/TestUser.qml b/tests/auto/qmlinterface/data/TestUser.qml index a02f4f1f..137d87ed 100644 --- a/tests/auto/qmlinterface/data/TestUser.qml +++ b/tests/auto/qmlinterface/data/TestUser.qml @@ -26,9 +26,13 @@ ** ****************************************************************************/ +import QtQuick import QtLocation -User { - name: "Test User" - userId: "test-user-id" +Item { + property user user + user { + name: "Test User" + userId: "test-user-id" + } } |