summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative_core/tst_geoshape.qml40
-rw-r--r--tests/auto/declarative_core/tst_map_routing.qml65
-rw-r--r--tests/auto/declarative_core/tst_place.qml42
-rw-r--r--tests/auto/declarative_core/tst_placesearchmodel.qml17
-rw-r--r--tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml16
-rw-r--r--tests/auto/declarative_ui/tst_map_geocoding.qml17
-rw-r--r--tests/auto/declarative_ui/tst_map_item_fit_viewport.qml17
-rw-r--r--tests/auto/qmlinterface/data/TestGeoCircle.qml51
-rw-r--r--tests/auto/qmlinterface/data/TestGeoRectangle.qml52
-rw-r--r--tests/auto/qmlinterface/data/TestLocation.qml11
-rw-r--r--tests/auto/qmlinterface/qmlinterface.pro4
-rw-r--r--tests/auto/qmlinterface/tst_qmlinterface.cpp45
12 files changed, 74 insertions, 303 deletions
diff --git a/tests/auto/declarative_core/tst_geoshape.qml b/tests/auto/declarative_core/tst_geoshape.qml
index 9cb06745..ff30548e 100644
--- a/tests/auto/declarative_core/tst_geoshape.qml
+++ b/tests/auto/declarative_core/tst_geoshape.qml
@@ -44,40 +44,42 @@ import QtTest 1.0
import QtLocation 5.0
Item {
+ id: testCase
+
property variant coordinate1: QtLocation.coordinate(1, 1)
property variant coordinate2: QtLocation.coordinate(2, 2)
property variant coordinate3: QtLocation.coordinate(80, 80)
- GeoCircle { id: emptyCircle }
- GeoCircle { id: circle1; center: coordinate1; radius: 200000 }
+ property variant emptyCircle: QtLocation.circle()
+ property variant circle1: QtLocation.circle(coordinate1, 200000)
- SignalSpy {id: radiusSpy; target: emptyCircle; signalName: "radiusChanged"}
- SignalSpy {id: centerSpy; target: emptyCircle; signalName: "centerChanged"}
+ SignalSpy { id: circleChangedSpy; target: testCase; signalName: "emptyCircleChanged" }
TestCase {
name: "Bounding circle"
function test_circle_defaults_and_setters() {
+ circleChangedSpy.clear();
compare (emptyCircle.radius, -1)
compare (circle1.radius, 200000)
emptyCircle.radius = 200
- compare (radiusSpy.count, 1)
- emptyCircle.radius = 200
- compare (radiusSpy.count, 1)
+ compare(circleChangedSpy.count, 1);
+ emptyCircle.radius = 200;
+ compare(circleChangedSpy.count, 1);
+ emptyCircle.center = coordinate1;
+ compare(circleChangedSpy.count, 2);
emptyCircle.center = coordinate1
- compare (centerSpy.count, 1)
- emptyCircle.center = coordinate1
- compare (centerSpy.count, 1)
+ compare(circleChangedSpy.count, 2);
emptyCircle.center = coordinate2
- compare (centerSpy.count, 2)
+ compare(circleChangedSpy.count, 3);
emptyCircle.center = coordinate1
emptyCircle.radius = 200000
- // TODO
- //compare(emptyCircle.contains(coordinate1), true)
- //compare(emptyCircle.contains(coordinate2), true)
- //compare(emptyCircle.contains(coordinate3), false)
+
+ compare(emptyCircle.contains(coordinate1), true);
+ compare(emptyCircle.contains(coordinate2), true);
+ compare(emptyCircle.contains(coordinate3), false);
}
}
@@ -91,13 +93,7 @@ Item {
property variant inside: QtLocation.coordinate(0.5, 0.5)
property variant outside: QtLocation.coordinate(2, 2)
- GeoRectangle {
- id: box;
- bottomLeft: bl
- topLeft: tl
- topRight: tr
- bottomRight: br
- }
+ property variant box: QtLocation.rectangle(tl, br)
// C++ auto test exists for basics of bounding box, testing here
// only added functionality
diff --git a/tests/auto/declarative_core/tst_map_routing.qml b/tests/auto/declarative_core/tst_map_routing.qml
index 5ec1c8dc..da0af8db 100644
--- a/tests/auto/declarative_core/tst_map_routing.qml
+++ b/tests/auto/declarative_core/tst_map_routing.qml
@@ -50,8 +50,18 @@ Item {
property variant coordinate1: QtLocation.coordinate(51, 0)
property variant coordinate2: QtLocation.coordinate(52, 0)
- GeoRectangle { id: boundingBox1; topLeft: coordinate2; bottomLeft: coordinate1; width: 1000 }
- GeoRectangle { id: boundingBox2; topLeft: coordinate2; bottomLeft: coordinate1; width: 1000 }
+ property variant boundingBox1: QtLocation.rectangle()
+ property variant boundingBox2: QtLocation.rectangle()
+
+ Component.onCompleted: {
+ boundingBox1.topLeft = coordinate1;
+ boundingBox1.bottomRight = coordinate2;
+ boundingBox1.width = 10;
+
+ boundingBox2.topLeft = coordinate2;
+ boundingBox2.bottomLeft = coordinate1;
+ boundingBox2.width = 20;
+ }
property variant bl: QtLocation.coordinate(0, 0)
property variant tl: QtLocation.coordinate(1, 0)
@@ -59,13 +69,7 @@ Item {
property variant br: QtLocation.coordinate(0, 1)
property variant ntr: QtLocation.coordinate(3, 3)
- GeoRectangle {
- id: unitBox;
- bottomLeft: bl
- topLeft: tl
- topRight: tr
- bottomRight: br
- }
+ property variant unitBox: QtLocation.rectangle(tl, br)
Route {id: emptyRoute}
TestCase {
@@ -76,7 +80,7 @@ Item {
// TODO enable when we have map route
//MapRoute {id: emptyMapRoute}
- GeoRectangle {id: emptyBox}
+ property variant emptyBox: QtLocation.rectangle()
property variant emptyCoordinate: QtLocation.coordinate()
@@ -313,42 +317,13 @@ Item {
compare(emptyQuery.excludedAreas.length, 0)
compare(exclusionSpy.count, 1)
- // Altering exclusion area details should trigger signals
- emptyQuery.clearExcludedAreas()
- emptyQuery.addExcludedArea(unitBox)
- queryDetailsChangedSpy.clear()
- compare (emptyQuery.excludedAreas.length, 1)
- unitBox.width = 200
- tryCompare(queryDetailsChangedSpy, "count", 1);
- unitBox.height = 200
- tryCompare(queryDetailsChangedSpy , "count", 2);
- unitBox.topRight = ntr
- tryCompare(queryDetailsChangedSpy, "count", 3);
-
- // verify box is disconnected
- emptyQuery.removeExcludedArea(unitBox)
- compare(queryDetailsChangedSpy.count, 4);
- unitBox.height = 400
- tryCompare(queryDetailsChangedSpy, "count", 4);
-
- // verify that same box instance only produces one set of changes
- compare (emptyQuery.excludedAreas.length, 0)
- emptyQuery.addExcludedArea(unitBox)
- emptyQuery.addExcludedArea(unitBox)
- compare (emptyQuery.excludedAreas.length, 1)
- queryDetailsChangedSpy.clear()
- unitBox.width = 777
- tryCompare(queryDetailsChangedSpy, "count", 1);
- compare (emptyQuery.excludedAreas.length, 1)
- unitBox.width = 200
- tryCompare(queryDetailsChangedSpy, "count", 2);
-
// verify that clearing works
- emptyQuery.clearExcludedAreas()
- compare (queryDetailsChangedSpy.count, 3)
- compare (emptyQuery.excludedAreas.length, 0)
- unitBox.width = 717
- tryCompare(queryDetailsChangedSpy, "count", 3);
+ emptyQuery.addExcludedArea(unitBox);
+ compare(emptyQuery.excludedAreas.length, 1);
+ queryDetailsChangedSpy.clear();
+ emptyQuery.clearExcludedAreas();
+ compare(queryDetailsChangedSpy.count, 1);
+ compare(emptyQuery.excludedAreas.length, 0)
// Feature types and weights
queryDetailsChangedSpy.clear()
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
diff --git a/tests/auto/declarative_core/tst_placesearchmodel.qml b/tests/auto/declarative_core/tst_placesearchmodel.qml
index 8ec3c0a2..aef710d9 100644
--- a/tests/auto/declarative_core/tst_placesearchmodel.qml
+++ b/tests/auto/declarative_core/tst_placesearchmodel.qml
@@ -66,17 +66,8 @@ TestCase {
name: "foo"
}
- Plugin {
- id: uninitializedPlugin
- }
-
- GeoCircle {
- id: testSearchArea
- center {
- latitude: 10
- longitude: 20
- }
- radius: 5000
+ Plugin {
+ id: uninitializedPlugin
}
Category {
@@ -104,9 +95,11 @@ TestCase {
}
function test_setAndGet_data() {
+ var testSearchArea = QtLocation.circle(QtLocation.coordinate(10, 20), 5000);
+
return [
{ tag: "plugin", property: "plugin", signal: "pluginChanged", value: testPlugin },
- { tag: "searchArea", property: "searchArea", signal: "searchAreaChanged", value: testSearchArea },
+ { tag: "searchArea", property: "searchArea", signal: "searchAreaChanged", value: testSearchArea, reset: QtLocation.shape() },
{ tag: "offset", property: "offset", signal: "offsetChanged", value: 10, reset: 0 },
{ tag: "limit", property: "limit", signal: "limitChanged", value: 10, reset: -1 },
diff --git a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml b/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
index b2c8b73e..bc4fbd80 100644
--- a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
+++ b/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
@@ -64,23 +64,15 @@ TestCase {
name: "nonExistantName"
}
- Plugin {
- id: uninitializedPlugin
- }
-
- GeoCircle {
- id: testSearchArea
- center {
- latitude: 10
- longitude: 20
- }
- radius: 5000
+ Plugin {
+ id: uninitializedPlugin
}
function test_setAndGet_data() {
+ var testSearchArea = QtLocation.circle(QtLocation.coordinate(10, 20), 5000);
return [
{ tag: "plugin", property: "plugin", signal: "pluginChanged", value: testPlugin },
- { tag: "searchArea", property: "searchArea", signal: "searchAreaChanged", value: testSearchArea },
+ { tag: "searchArea", property: "searchArea", signal: "searchAreaChanged", value: testSearchArea, reset: QtLocation.shape() },
{ tag: "offset", property: "offset", signal: "offsetChanged", value: 10, reset: 0 },
{ tag: "limit", property: "limit", signal: "limitChanged", value: 10, reset: -1 },
diff --git a/tests/auto/declarative_ui/tst_map_geocoding.qml b/tests/auto/declarative_ui/tst_map_geocoding.qml
index 2d64fcd6..072b27ee 100644
--- a/tests/auto/declarative_ui/tst_map_geocoding.qml
+++ b/tests/auto/declarative_ui/tst_map_geocoding.qml
@@ -49,14 +49,16 @@ Item {
property variant coordinate1: QtLocation.coordinate(51, 41)
property variant coordinate2: QtLocation.coordinate(52, 42)
+ property variant coordinate3: QtLocation.coordinate(53, 43)
property variant emptyCoordinate: QtLocation.coordinate()
- GeoRectangle { id: boundingBox1; topLeft: coordinate2; bottomLeft: coordinate1; width: 1000 }
- GeoRectangle { id: boundingBox2; topLeft: coordinate2; bottomLeft: coordinate1; width: 1000 }
- GeoCircle { id: boundingCircle1; center: coordinate1; radius: 100 }
- GeoCircle { id: boundingCircle2; center: coordinate2; radius: 100 }
+ property variant boundingBox1: QtLocation.rectangle(coordinate1, coordinate2)
+ property variant boundingBox2: QtLocation.rectangle(coordinate1, coordinate3)
+ property variant boundingCircle1: QtLocation.circle(coordinate1, 100)
+ property variant boundingCircle2: QtLocation.circle(coordinate2, 100)
+
+ property variant emptyBox: QtLocation.rectangle()
- GeoRectangle {id: emptyBox}
GeocodeModel {id: emptyModel}
Address {id: emptyAddress}
@@ -122,8 +124,7 @@ Item {
compare(boundsSpy.count, 2)
compare(emptyModel.bounds.topLeft.latitude, boundingBox2.topLeft.latitude)
compare(emptyModel.bounds.bottomRight.longitude, boundingBox2.bottomRight.longitude)
- var dynamicBox = Qt.createQmlObject("import QtQuick 2.0; import QtLocation 5.0; GeoRectangle { id: dynBox }", testCase1)
- emptyModel.bounds = dynamicBox
+ emptyModel.bounds = QtLocation.rectangle();
compare(boundsSpy.count, 3)
@@ -138,7 +139,7 @@ Item {
emptyModel.bounds = boundingCircle2
compare(boundsSpy.count, 2)
compare(emptyModel.bounds.center.latitude, coordinate2.latitude)
- var dynamicCircle = Qt.createQmlObject("import QtQuick 2.0; import QtLocation 5.0; GeoCircle { id: dynCircle; center { latitude: 8; longitude: 9 } }", testCase1)
+ var dynamicCircle = QtLocation.circle(QtLocation.coordinate(8, 9));
emptyModel.bounds = dynamicCircle
compare(boundsSpy.count, 3)
compare(emptyModel.bounds.center.latitude, dynamicCircle.center.latitude)
diff --git a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
index 8073e638..4cbbab74 100644
--- a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
+++ b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
@@ -110,17 +110,8 @@ Item {
property variant mapRouteTopLeft: QtLocation.coordinate(0, 0)
property variant mapRouteBottomRight: QtLocation.coordinate(0, 0)
- GeoRectangle {
- id: boundingBox
- topLeft {
- latitude: 0
- longitude: 0
- }
- bottomRight {
- latitude: 0
- longitude: 0
- }
- }
+ property variant boundingBox: QtLocation.rectangle(QtLocation.coordinate(0, 0),
+ QtLocation.coordinate(0, 0))
Map {
id: map;
@@ -477,9 +468,7 @@ Item {
point.y = maxY
var itemBottomRight = map.toCoordinate(point)
- boundingBox.topLeft = itemTopLeft;
- boundingBox.bottomRight = itemBottomRight;
- return boundingBox
+ return QtLocation.rectangle(itemTopLeft, itemBottomRight);
}
function verify_visibility_all_items(){
diff --git a/tests/auto/qmlinterface/data/TestGeoCircle.qml b/tests/auto/qmlinterface/data/TestGeoCircle.qml
deleted file mode 100644
index d645cef2..00000000
--- a/tests/auto/qmlinterface/data/TestGeoCircle.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtLocation 5.0
-
-GeoCircle {
- center {
- longitude: 10.0
- latitude: 20.0
- altitude: 30.0
- }
- radius: 30.0
-}
diff --git a/tests/auto/qmlinterface/data/TestGeoRectangle.qml b/tests/auto/qmlinterface/data/TestGeoRectangle.qml
deleted file mode 100644
index 00e0fea6..00000000
--- a/tests/auto/qmlinterface/data/TestGeoRectangle.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtLocation 5.0
-
-GeoRectangle {
- center {
- longitude: 10.0
- latitude: 20.0
- altitude: 30.0
- }
- height: 30.0
- width: 40.0
-}
diff --git a/tests/auto/qmlinterface/data/TestLocation.qml b/tests/auto/qmlinterface/data/TestLocation.qml
index 97c25e5a..6ba74fd8 100644
--- a/tests/auto/qmlinterface/data/TestLocation.qml
+++ b/tests/auto/qmlinterface/data/TestLocation.qml
@@ -43,7 +43,16 @@ import QtLocation 5.0
Location {
address: TestAddress { }
- boundingBox: TestGeoRectangle { }
+ boundingBox {
+ center {
+ longitude: 10.0
+ latitude: 20.0
+ altitude: 30.0
+ }
+ height: 30.0
+ width: 40.0
+ }
+
coordinate {
longitude: 10.0
latitude: 20.0
diff --git a/tests/auto/qmlinterface/qmlinterface.pro b/tests/auto/qmlinterface/qmlinterface.pro
index 6571fe90..8dbd9bbe 100644
--- a/tests/auto/qmlinterface/qmlinterface.pro
+++ b/tests/auto/qmlinterface/qmlinterface.pro
@@ -28,8 +28,6 @@ OTHER_FILES += \
data/TestSupplier.qml \
data/TestUser.qml \
data/TestPlaceAttribute.qml \
- data/TestContactDetail.qml \
- data/TestGeoRectangle.qml \
- data/TestGeoCircle.qml
+ data/TestContactDetail.qml
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/qmlinterface/tst_qmlinterface.cpp b/tests/auto/qmlinterface/tst_qmlinterface.cpp
index 0b529e9e..49a769a0 100644
--- a/tests/auto/qmlinterface/tst_qmlinterface.cpp
+++ b/tests/auto/qmlinterface/tst_qmlinterface.cpp
@@ -66,8 +66,6 @@ public:
private Q_SLOTS:
void testAddress();
- void testGeoRectangle();
- void testGeoCircle();
void testLocation();
void testCategory();
void testIcon();
@@ -82,7 +80,6 @@ private:
QGeoCoordinate m_coordinate;
QGeoAddress m_address;
QGeoRectangle m_rectangle;
- QGeoCircle m_boundingCircle;
QGeoLocation m_location;
QPlaceCategory m_category;
QPlaceIcon m_icon;
@@ -112,9 +109,6 @@ tst_qmlinterface::tst_qmlinterface()
m_rectangle.setHeight(30.0);
m_rectangle.setWidth(40.0);
- m_boundingCircle.setCenter(m_coordinate);
- m_boundingCircle.setRadius(30.0);
-
m_location.setAddress(m_address);
m_location.setBoundingBox(m_rectangle);
m_location.setCoordinate(m_coordinate);
@@ -186,45 +180,6 @@ void tst_qmlinterface::testAddress()
delete qmlObject;
}
-void tst_qmlinterface::testGeoRectangle()
-{
- QQmlEngine engine;
- QQmlComponent component(&engine, SRCDIR "data/TestGeoRectangle.qml");
- QVERIFY(component.isReady());
- QObject *qmlObject = component.create();
-
- QGeoRectangle rectangle = qmlObject->property("rectangle").value<QGeoRectangle>();
-
- QCOMPARE(rectangle, m_rectangle);
-
- qmlObject->setProperty("rectangle", QVariant::fromValue(QGeoRectangle()));
-
- QCOMPARE(qmlObject->property("center").value<QGeoCoordinate>(), QGeoCoordinate());
- QVERIFY(qIsNaN(qmlObject->property("height").toDouble()));
- QVERIFY(qIsNaN(qmlObject->property("width").toDouble()));
-
- delete qmlObject;
-}
-
-void tst_qmlinterface::testGeoCircle()
-{
- QQmlEngine engine;
- QQmlComponent component(&engine, SRCDIR "data/TestGeoCircle.qml");
- QVERIFY(component.isReady());
- QObject *qmlObject = component.create();
-
- QGeoCircle boundingCircle = qmlObject->property("circle").value<QGeoCircle>();
-
- QCOMPARE(boundingCircle, m_boundingCircle);
-
- qmlObject->setProperty("circle", QVariant::fromValue(QGeoCircle()));
-
- QCOMPARE(qmlObject->property("center").value<QGeoCoordinate>(), QGeoCoordinate());
- QCOMPARE(qmlObject->property("radius").toDouble(), -1.0);
-
- delete qmlObject;
-}
-
void tst_qmlinterface::testLocation()
{
QQmlEngine engine;