summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-11-18 18:16:12 +0100
committerMichal Klocek <michal.klocek@theqtcompany.com>2015-11-23 14:05:04 +0000
commit608c17acaf124a9f6b83316e03a40b8d01fef92e (patch)
tree18b6ae4f23189982f537532484f865028d7d93b9 /tests
parent775dc837ecc5cd71a34cb8b87225a9196df7cff1 (diff)
downloadqtlocation-608c17acaf124a9f6b83316e03a40b8d01fef92e.tar.gz
Remove fitViewportToGeoShape from map qml api
Use visibleRegion to fit the map's viewport [ChangeLog][Map] Remove fitViewportToGeoShape from map qml api Change-Id: I378329602a5c1f4cceda327f7abcca61c1217564 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_ui/tst_map_error.qml8
-rw-r--r--tests/auto/declarative_ui/tst_map_item_fit_viewport.qml8
2 files changed, 4 insertions, 12 deletions
diff --git a/tests/auto/declarative_ui/tst_map_error.qml b/tests/auto/declarative_ui/tst_map_error.qml
index 68752f11..aaa58e6c 100644
--- a/tests/auto/declarative_ui/tst_map_error.qml
+++ b/tests/auto/declarative_ui/tst_map_error.qml
@@ -193,14 +193,6 @@ Item {
map_no_plugin.fitViewportToMapItems()
}
- function test_map_fitViewportToGeoShape()
- {
- map_no_plugin.fitViewportToGeoShape(QtPositioning.circle(coordinate,1000))
- verify(map_no_plugin.center != coordinate)
- map_error_plugin.fitViewportToGeoShape(QtPositioning.circle(coordinate,1000))
- verify(map_error_plugin.center != coordinate)
- }
-
function test_map_setVisibleRegion()
{
map_no_plugin.visibleRegion = QtPositioning.circle(coordinate,1000)
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 55fbd348..8671d05d 100644
--- a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
+++ b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
@@ -322,7 +322,7 @@ Item {
verify(!is_coord_on_screen(fitRect.topLeft))
verify(!is_coord_on_screen(fitRect.bottomRight))
- map.fitViewportToGeoShape(fitRect)
+ map.visibleRegion = fitRect
visualInspectionPoint()
calculate_fit_circle_bounds()
//Rectangle should be visible, not circle
@@ -331,7 +331,7 @@ Item {
verify(is_coord_on_screen(fitRect.topLeft))
verify(is_coord_on_screen(fitRect.bottomRight))
- map.fitViewportToGeoShape(fitCircle)
+ map.visibleRegion = fitCircle
visualInspectionPoint()
calculate_fit_circle_bounds()
//Circle should be visible, not rectangle
@@ -340,7 +340,7 @@ Item {
verify(!is_coord_on_screen(fitRect.topLeft))
verify(!is_coord_on_screen(fitRect.bottomRight))
- map.fitViewportToGeoShape(fitInvalidShape)
+ map.visibleRegion = fitInvalidShape
visualInspectionPoint()
calculate_fit_circle_bounds()
//Invalid shape, map should be in the same position as before
@@ -349,7 +349,7 @@ Item {
verify(!is_coord_on_screen(fitRect.topLeft))
verify(!is_coord_on_screen(fitRect.bottomRight))
- map.fitViewportToGeoShape(fitEmptyRect)
+ map.visibleRegion = fitEmptyRect
visualInspectionPoint()
calculate_fit_circle_bounds()
//Empty shape, map should change centerlocation, empty rect visible