summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2013-11-15 07:45:54 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 01:38:32 +0100
commit545e3f0540a1bd8e431391e325038fabca915867 (patch)
treed41d8d88921de1a407f30e8d8e39a5bdce7bf2a5 /tests
parent4a1f2da3df92eed75cb7d473ae77c63e48fdd97a (diff)
downloadqtlocation-545e3f0540a1bd8e431391e325038fabca915867.tar.gz
Remove the GeoMapMouseArea
I don't see a reason for keeping this. First of all, only half of it is implemented. Second we can have the same behavior with a normal MouseArea. The only advantage a MapMouseArea has is that mouse events are only received in the boundaries of the parent map item. However with a bit of work in the parent map item we can have this behavior as well for a normal mouse area. The only thing we are eventually loosing is the geocoordinate property of the MapMouseEvent. But this can be easily obtained with the "toCoordinate" function in the Map item. Change-Id: Icb176ee7d7c2881df714ab3191fa1f7f5c8915e2 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_ui/tst_map_item.qml10
-rw-r--r--tests/auto/declarative_ui/tst_map_item_details.qml22
-rw-r--r--tests/auto/declarative_ui/tst_map_item_fit_viewport.qml7
-rw-r--r--tests/auto/declarative_ui/tst_map_mouse.qml10
4 files changed, 24 insertions, 25 deletions
diff --git a/tests/auto/declarative_ui/tst_map_item.qml b/tests/auto/declarative_ui/tst_map_item.qml
index 6533e964..cfb1c51b 100644
--- a/tests/auto/declarative_ui/tst_map_item.qml
+++ b/tests/auto/declarative_ui/tst_map_item.qml
@@ -97,7 +97,7 @@ Item {
}
color: 'firebrick'
radius: 600000
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
onClicked: console.log('ext circle clicked')
SignalSpy { id: extMapCircleClicked; target: parent; signalName: "clicked" }
@@ -106,7 +106,7 @@ Item {
MapQuickItem {
id: extMapQuickItem
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
SignalSpy { id: extMapQuickItemClicked; target: parent; signalName: "clicked" }
}
@@ -160,7 +160,7 @@ Item {
longitude: 30
}
radius: 400000
- MapMouseArea {
+ MouseArea {
id: preMapCircleMa
anchors.fill: parent
drag.target: parent
@@ -175,7 +175,7 @@ Item {
}
MapQuickItem {
id: preMapQuickItem
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
SignalSpy { id: preMapQuickItemClicked; target: parent; signalName: "clicked" }
@@ -204,7 +204,7 @@ Item {
{ latitude: 20, longitude: 10 },
{ latitude: 15, longitude: 6 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
SignalSpy { id: preMapPolygonClicked; target: parent; signalName: "clicked" }
diff --git a/tests/auto/declarative_ui/tst_map_item_details.qml b/tests/auto/declarative_ui/tst_map_item_details.qml
index ccaba322..a15fc353 100644
--- a/tests/auto/declarative_ui/tst_map_item_details.qml
+++ b/tests/auto/declarative_ui/tst_map_item_details.qml
@@ -65,7 +65,7 @@ Item {
{ latitude: 25, longitude: 5 },
{ latitude: 20, longitude: 10 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
SignalSpy { id: extMapPolygonClicked; target: parent; signalName: "clicked" }
@@ -109,7 +109,7 @@ Item {
latitude: 10
longitude: -175
}
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -123,7 +123,7 @@ Item {
longitude: 180
}
radius: 400000
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -131,7 +131,7 @@ Item {
MapQuickItem {
id: extMapQuickItemDateline
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -155,7 +155,7 @@ Item {
{ latitude: 10, longitude: -175 },
{ latitude: 10, longitude: 175 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -168,7 +168,7 @@ Item {
{ latitude: 20, longitude: 175 },
{ latitude: 25, longitude: -175 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -196,7 +196,7 @@ Item {
latitude: 10
longitude: -5
}
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -210,7 +210,7 @@ Item {
longitude: -15
}
radius: 400000
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -218,7 +218,7 @@ Item {
MapQuickItem {
id: extMapQuickItemEdge
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -242,7 +242,7 @@ Item {
{ latitude: 10, longitude: -5 },
{ latitude: 10, longitude: -15 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
@@ -255,7 +255,7 @@ Item {
{ latitude: 20, longitude: -15 },
{ latitude: 25, longitude: -5 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
}
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 ff3d224c..26cef4f8 100644
--- a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
+++ b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
@@ -152,8 +152,7 @@ Item {
border.width: 0
center: preMapCircleDefaultCenter
radius: 400000
- MapMouseArea {
- id: preMapCircleMa
+ MouseArea {
anchors.fill: parent
drag.target: parent
SignalSpy { id: preMapCircleClicked; target: parent; signalName: "clicked" }
@@ -167,7 +166,7 @@ Item {
}
MapQuickItem {
id: preMapQuickItem
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
SignalSpy { id: preMapQuickItemClicked; target: parent; signalName: "clicked" }
@@ -193,7 +192,7 @@ Item {
{ latitude: 20, longitude: 10 },
{ latitude: 15, longitude: 6 }
]
- MapMouseArea {
+ MouseArea {
anchors.fill: parent
drag.target: parent
SignalSpy { id: preMapPolygonClicked; target: parent; signalName: "clicked" }
diff --git a/tests/auto/declarative_ui/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml
index 7787d462..d059bcfb 100644
--- a/tests/auto/declarative_ui/tst_map_mouse.qml
+++ b/tests/auto/declarative_ui/tst_map_mouse.qml
@@ -46,7 +46,7 @@ import QtPositioning 5.2
import QtLocation.test 5.0
/*
- MapMouseArea setup for this test case.
+ MouseArea setup for this test case.
Map dimensions are 100 * 100
Item containing map is 120,120
@@ -117,7 +117,7 @@ Item {
lastWheelAngleDeltaY = angleDelta.y;
}
- MapMouseArea {
+ MouseArea {
id: mouseUpper
objectName: "mouseUpper"
x: 0; y: 20; width: 100; height: 29
@@ -137,7 +137,7 @@ Item {
onPositionChanged: { page.setMouseData(mouseUpper, mouse); }
onPressAndHold: { page.setMouseData(mouseUpper, mouse); }
}
- MapMouseArea {
+ MouseArea {
id: mouseLower
objectName: "mouseLower"
x: 0; y: 50; width: 100; height: 50
@@ -156,7 +156,7 @@ Item {
onPositionChanged: { page.setMouseData(mouseLower, mouse); }
onPressAndHold: { page.setMouseData(mouseLower, mouse); }
}
- MapMouseArea {
+ MouseArea {
id: mouseOverlapper
objectName: "mouseOverlapper"
x: 50; y: 0; width: 50; height: 100
@@ -178,7 +178,7 @@ Item {
}
TestCase {
- name: "MapMouseArea"
+ name: "MouseArea"
when: windowShown
SignalSpy {id: mouseUpperClickedSpy; target: mouseUpper; signalName: "clicked"}
SignalSpy {id: mouseLowerClickedSpy; target: mouseLower; signalName: "clicked"}