summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-08-10 12:50:10 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-08-14 11:16:53 +0000
commit40e9867254d2241fdac1ea76d416ad54e71d04ac (patch)
tree1e377b8ab2eabc87490e300c34983c5c0dc6461c /tests
parent07be65e9d9a883aab4e1fda367cf591b7cb97631 (diff)
downloadqtlocation-40e9867254d2241fdac1ea76d416ad54e71d04ac.tar.gz
Make QDeclarativeGeoMapItemBase::geoShape R/W
This patch adds a setter for the geoShape property, overridden in the subclasses. Change-Id: I5fc4d412efee5e95c5650943ea5bf9b72dc40155 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_geoshape/tst_locationsingleton.qml13
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/auto/declarative_geoshape/tst_locationsingleton.qml b/tests/auto/declarative_geoshape/tst_locationsingleton.qml
index a5e791e0..096a72e9 100644
--- a/tests/auto/declarative_geoshape/tst_locationsingleton.qml
+++ b/tests/auto/declarative_geoshape/tst_locationsingleton.qml
@@ -313,21 +313,10 @@ Item {
compare(geopath.path.length, mapPolyline.pathLength())
compare(geopath.boundingGeoRectangle(), mapPolyline.geoShape.boundingGeoRectangle())
- mapPolylineGeopath.path = mapPolyline.path
+ mapPolylineGeopath.geoShape = geopath
compare(mapPolylineGeopath.pathLength(), mapPolyline.pathLength())
compare(mapPolylineGeopath.geoShape.boundingGeoRectangle(), mapPolyline.geoShape.boundingGeoRectangle())
- try {
- var err = false;
- mapPolylineGeopath.geoShape = geopath
- } catch (e) {
- if (e.message != 'Cannot assign to read-only property "geoShape"')
- fail('Expected Cannot assign to read-only property "geoShape", got: ' + e.message);
- err = true;
- } finally {
- verify(err, 'should throw Cannot assign to read-only property "geoShape"');
- }
-
geopath.path = trace2
geopath.path[0].longitude = 11.0
compare(geopath.path.length, trace2.length)