From 964a1bb8532249f82d4d647bd496d77ccb5e240f Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 18 Dec 2019 21:33:57 +0100 Subject: 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 --- tests/auto/declarative_geoshape/tst_locationsingleton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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) -- cgit v1.2.3