diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2012-08-16 13:32:43 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-28 10:07:49 +0200 |
commit | 059388adce26be48868cd741b4c5d751298fb4d8 (patch) | |
tree | 1a8a41c0f280b7ab3c502b49527bd609d1c0884a /tests/auto/declarative_core/tst_place.qml | |
parent | 7dd46f8c96a4bdaca2809ff97b773f358392516f (diff) |
Convert GeoShape, GeoRectangle and GeoCircle into QML value types.v5.0.0-beta1
This replaces the GeoShape, GeoRectangle and GeoCircle QML elements with
value types. A value type is a better fit for shape types. It is very
similar to a rect with some utility functions.
Declare QGeoShape, QGeoRectangle and QGeoCircle as movable types.
Update documentation.
Change-Id: Id6c48e1e841c68f2f0c5c6a9c4a6580a57e2dfb6
Reviewed-by: abcd <amos.choy@nokia.com>
Diffstat (limited to 'tests/auto/declarative_core/tst_place.qml')
-rw-r--r-- | tests/auto/declarative_core/tst_place.qml | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/tests/auto/declarative_core/tst_place.qml b/tests/auto/declarative_core/tst_place.qml index 9b4ae991..95d0f538 100644 --- a/tests/auto/declarative_core/tst_place.qml +++ b/tests/auto/declarative_core/tst_place.qml @@ -91,12 +91,8 @@ TestCase { altitude: 100 } - boundingBox: GeoRectangle { - center { - latitude: 10 - longitude: 10 - altitude: 100 - } + boundingBox { + center: QtLocation.coordinate(10, 10, 100) width: 100 height: 100 } @@ -146,13 +142,6 @@ TestCase { visibility: Place.PublicVisibility } - // compares two coordinates property by property - function compare_coordinate(coord1, coord2) { - return coord1.latitude === coord2.latitude && - coord1.longitude === coord2.longitude && - coord1.altitude === coord2.altitude; - } - // compares two places property by property function compare_place(place1, place2) { // check simple properties @@ -244,33 +233,10 @@ TestCase { if (place1.location.address.postalCode !== place2.location.address.postalCode) return false; - /* - if (!compare_coordinate(place1.location.coordinate, place2.location.coordinate)) - return false; - console.log("location.coordinate is equal"); - if (!compare_coordinate(place1.location.boundingBox.bottomLeft, place2.location.boundingBox.bottomLeft)) - return false; - console.log("location.boundingBox.bottomLeft is equal"); - if (!compare_coordinate(place1.location.boundingBox.bottomRight, place2.location.boundingBox.bottomRight)) - return false; - console.log("location.boundingBox.bottomRight is equal"); - if (!compare_coordinate(place1.location.boundingBox.topLeft, place2.location.boundingBox.topLeft)) - return false; - console.log("location.boundingBox.topLeft is equal"); - if (!compare_coordinate(place1.location.boundingBox.topRight, place2.location.boundingBox.topRight)) - return false; - console.log("location.boundingBox.topRight is equal"); - if (!compare_coordinate(place1.location.boundingBox.center, place2.location.boundingBox.center)) - return false; - console.log("location.boundingBox.center is equal"); - console.log(place1.location.boundingBox.height + " eq " + place2.location.boundingBox.height); - if (place1.location.boundingBox.height !== place2.location.boundingBox.height) + if (place1.location.coordinate !== place2.location.coordinate) return false; - console.log(place1.location.boundingBox.width + " eq " + place2.location.boundingBox.width); - if (place1.location.boundingBox.width !== place2.location.boundingBox.width) + if (place1.location.boundingBox !== place2.location.boundingBox) return false; - console.log("location.boundingBox is equal"); - */ } // check icon |