diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-08-29 16:48:51 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-01-27 09:56:21 +0000 |
commit | a6ff21e1e5ae264b7de264b47e08d334739fa4c6 (patch) | |
tree | 0da24ba1c0a9b5b0190d1f8a8c844ac3a9e4ea64 /tests/auto/declarative_core | |
parent | d8a7da2c00d9b292e56f28cf2df4f191e6edce2c (diff) | |
download | qtlocation-a6ff21e1e5ae264b7de264b47e08d334739fa4c6.tar.gz |
Make QPlace extensible
This change makes it possible to subclass QPlace
with custom private implementations.
Change-Id: I363c0e8b7db41d9a8400ce6dbddf5405c619eeef
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests/auto/declarative_core')
-rw-r--r-- | tests/auto/declarative_core/tst_placesearchmodel.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative_core/tst_placesearchmodel.qml b/tests/auto/declarative_core/tst_placesearchmodel.qml index 2d3c599c..4c7897b5 100644 --- a/tests/auto/declarative_core/tst_placesearchmodel.qml +++ b/tests/auto/declarative_core/tst_placesearchmodel.qml @@ -129,6 +129,16 @@ TestCase { ] }, { + tag: "searchTerm, multiple results", + property: "searchTerm", + value: "sea", + reset: "", + alternate: true, + places: [ + "8f72057a-54b2-4e95-a7bb-97b4d2b5721e" + ] + }, + { tag: "categories, single result", property: "categories", value: [ park ], @@ -192,6 +202,14 @@ TestCase { verify(data.places.indexOf(place.placeId) >= 0); } + // Test for alternate implementation + if (data.alternate !== undefined && data.alternate === true) { + for (var ii = 0; ii < testModel.count; ++ii) { + var p = testModel.data(ii, "place"); + compare(p.extendedAttributes["x_provider"].text, "QPlacePrivateDefaultAlt") + } + } + testModel.reset(); compare(statusChangedSpy.count, 3); |