summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli.qt@gmail.com>2019-12-18 21:33:57 +0100
committerpaolo <paolo.angelelli.qt@gmail.com>2020-02-03 14:59:54 +0100
commit964a1bb8532249f82d4d647bd496d77ccb5e240f (patch)
treedf0d138fbe1e7758b8b5c52d1a35faa5f19a0919 /tests
parentfc8ca2cccd684e69131907151b2beb678afdff1d (diff)
Fix QGeoPolygon translate not updating clipper cache
Problem resulting in failure when calling the contains() method. This patch caches the leftbound that is used in many other methods. This patch also fixes the copy constructor, now correctly converting rectangles and circles into polygons. Tests are added in a subsequent patch. [ChangeLog][QtPositioning][QGeoPolygon] Fixed contains method. Change-Id: I324e5a6e9bf981f830a8bb88e5f2abedb5ece5dd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_geoshape/tst_locationsingleton.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/declarative_geoshape/tst_locationsingleton.qml b/tests/auto/declarative_geoshape/tst_locationsingleton.qml
index 096a72e9..b58eedfd 100644
--- a/tests/auto/declarative_geoshape/tst_locationsingleton.qml
+++ b/tests/auto/declarative_geoshape/tst_locationsingleton.qml
@@ -222,11 +222,11 @@ Item {
polygon = QtPositioning.shapeToPolygon(QtPositioning.circle())
verify(!polygon.isValid)
polygon = QtPositioning.shapeToPolygon(QtPositioning.circle(tl, 10000))
- verify(!polygon.isValid)
+ verify(polygon.isValid) // fixed, polygon copy constructor can now initialize from a circle.
polygon = QtPositioning.shapeToPolygon(QtPositioning.rectangle())
verify(!polygon.isValid)
polygon = QtPositioning.shapeToPolygon(QtPositioning.rectangle(tl, br))
- verify(!polygon.isValid)
+ verify(polygon.isValid) // fixed, polygon copy constructor can now initialize from a rectangle.
polygon = QtPositioning.shapeToPolygon(QtPositioning.polygon())
verify(!polygon.isValid)