summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2014-03-10 17:37:49 +0100
committerSergio Ahumada <sahumada@blackberry.com>2014-03-10 17:37:49 +0100
commitbacc237f032bebe51c436760d31e4a804c3ee034 (patch)
tree70de5721ca73a12e0c1bb4cc16082d6b10102493
parent9c6030845af9b31251182ee3d91186e18d939e9a (diff)
parent5f0023a7469e01bada70fbe677b76bb535eaa953 (diff)
downloadqtlocation-bacc237f032bebe51c436760d31e4a804c3ee034.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I06fe61d44bce186a118978f17fb66d6fc2cdd543
-rw-r--r--examples/location/mapviewer/content/dialogs/RouteDialog.qml2
-rw-r--r--examples/location/mapviewer/content/map/3dItem.qml2
-rw-r--r--examples/location/mapviewer/content/map/CircleItem.qml2
-rw-r--r--examples/location/mapviewer/content/map/ImageItem.qml2
-rw-r--r--examples/location/mapviewer/content/map/MapComponent.qml2
-rw-r--r--examples/location/mapviewer/content/map/Marker.qml2
-rw-r--r--examples/location/mapviewer/content/map/MiniMap.qml2
-rw-r--r--examples/location/mapviewer/content/map/PolygonItem.qml2
-rw-r--r--examples/location/mapviewer/content/map/PolylineItem.qml2
-rw-r--r--examples/location/mapviewer/content/map/RectangleItem.qml2
-rw-r--r--examples/location/mapviewer/content/map/VideoItem.qml2
-rw-r--r--examples/location/mapviewer/mapviewer.qml14
-rw-r--r--examples/location/places/content/places/CategoryDelegate.qml2
-rw-r--r--examples/location/places/content/places/CategoryDialog.qml4
-rw-r--r--examples/location/places/content/places/CategoryView.qml2
-rw-r--r--examples/location/places/content/places/EditorialDelegate.qml2
-rw-r--r--examples/location/places/content/places/EditorialPage.qml2
-rw-r--r--examples/location/places/content/places/MapComponent.qml2
-rw-r--r--examples/location/places/content/places/OptionsDialog.qml2
-rw-r--r--examples/location/places/content/places/PlaceDelegate.qml2
-rw-r--r--examples/location/places/content/places/PlaceDialog.qml12
-rw-r--r--examples/location/places/content/places/PlaceEditorials.qml2
-rw-r--r--examples/location/places/content/places/PlaceImages.qml2
-rw-r--r--examples/location/places/content/places/PlaceReviews.qml2
-rw-r--r--examples/location/places/content/places/ReviewDelegate.qml2
-rw-r--r--examples/location/places/content/places/ReviewPage.qml2
-rw-r--r--examples/location/places/content/places/SearchBox.qml2
-rw-r--r--examples/location/places/content/places/SearchResultDelegate.qml2
-rw-r--r--examples/location/places/content/places/SearchResultView.qml2
-rw-r--r--examples/location/places/places.qml16
-rw-r--r--examples/location/places_list/places_list.qml2
-rw-r--r--examples/location/places_map/places_map.qml2
-rw-r--r--src/3rdparty/poly2tri/sweep/sweep.cpp2
-rw-r--r--src/3rdparty/poly2tri/sweep/sweep_context.h2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp26
-rw-r--r--src/imports/location/error_messages.cpp43
-rw-r--r--src/imports/location/error_messages.h31
-rw-r--r--src/imports/location/location.cpp111
-rw-r--r--src/imports/location/plugins.qmltypes81
-rw-r--r--src/imports/location/qdeclarativecirclemapitem.cpp5
-rw-r--r--src/imports/location/qdeclarativecirclemapitem_p.h6
-rw-r--r--src/imports/location/qdeclarativegeocodemodel.cpp17
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp14
-rw-r--r--src/imports/location/qdeclarativegeomapitemview.cpp8
-rw-r--r--src/imports/location/qdeclarativegeoroutemodel.cpp30
-rw-r--r--src/imports/location/qdeclarativepolygonmapitem.cpp10
-rw-r--r--src/imports/location/qdeclarativepolygonmapitem_p.h4
-rw-r--r--src/imports/location/qdeclarativepolylinemapitem.cpp9
-rw-r--r--src/imports/location/qdeclarativepolylinemapitem_p.h4
-rw-r--r--src/imports/location/qdeclarativerectanglemapitem.cpp3
-rw-r--r--src/imports/location/qdeclarativerectanglemapitem_p.h4
-rw-r--r--src/imports/location/qgeomapitemgeometry.cpp19
-rw-r--r--src/imports/location/qgeomapitemgeometry_p.h22
-rw-r--r--src/imports/positioning/plugins.qmltypes19
-rw-r--r--src/imports/positioning/positioning.pro2
-rw-r--r--src/imports/positioning/qdeclarativepositionsource.cpp5
-rw-r--r--src/location/doc/snippets/declarative/maps.qml4
-rw-r--r--src/location/doc/snippets/declarative/places.qml14
-rw-r--r--src/location/doc/snippets/declarative/places_loader.qml2
-rw-r--r--src/location/doc/snippets/declarative/plugin.qml2
-rw-r--r--src/location/doc/snippets/declarative/routing.qml2
-rw-r--r--src/location/doc/snippets/places/requesthandler.h2
-rw-r--r--src/location/doc/src/qml-maps.qdoc2
-rw-r--r--src/location/doc/src/qtlocation-qml.qdoc2
-rw-r--r--src/location/doc/src/qtlocation.qdoc4
-rw-r--r--src/location/maps/qgeocameracapabilities.cpp4
-rw-r--r--src/location/maps/qgeocameratiles.cpp19
-rw-r--r--src/location/maps/qgeocameratiles_p.h1
-rw-r--r--src/location/maps/qgeocodingmanager.cpp4
-rw-r--r--src/location/maps/qgeomap.cpp4
-rw-r--r--src/location/maps/qgeomapdata.cpp2
-rw-r--r--src/location/maps/qgeoroutingmanager.cpp4
-rw-r--r--src/location/maps/qgeoserviceprovider.cpp2
-rw-r--r--src/location/maps/qgeotilecache.cpp24
-rw-r--r--src/location/maps/qgeotilecache_p.h1
-rw-r--r--src/location/maps/qgeotiledmapdata.cpp26
-rw-r--r--src/location/maps/qgeotiledmapdata_p.h4
-rw-r--r--src/location/maps/qgeotiledmapdata_p_p.h1
-rw-r--r--src/location/maps/qgeotiledmappingmanagerengine_p.h1
-rw-r--r--src/location/maps/qgeotilespec.cpp39
-rw-r--r--src/location/maps/qgeotilespec_p.h5
-rw-r--r--src/location/maps/qgeotilespec_p_p.h3
-rw-r--r--src/location/places/qplaceicon.cpp2
-rw-r--r--src/location/places/qplacematchrequest.cpp2
-rw-r--r--src/location/places/qplaceresult.cpp2
-rw-r--r--src/plugins/geoservices/nokia/nokia.pro6
-rw-r--r--src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp6
-rw-r--r--src/plugins/geoservices/nokia/qgeomapversion.cpp (renamed from src/imports/positioning/error_messages.cpp)55
-rw-r--r--src/plugins/geoservices/nokia/qgeomapversion.h (renamed from src/imports/positioning/error_messages.h)39
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp10
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.cpp6
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.h2
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp82
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h7
-rw-r--r--src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp71
-rw-r--r--src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h3
-rw-r--r--src/plugins/geoservices/nokia/qgeouriprovider.cpp2
-rw-r--r--src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp2
-rw-r--r--src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp4
-rw-r--r--src/plugins/position/corelocation/corelocation.pro2
-rw-r--r--src/plugins/position/geoclue/qgeocluemaster.cpp6
-rw-r--r--src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp326
-rw-r--r--src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h30
-rw-r--r--src/plugins/position/positionpoll/positionpoll.pro2
-rw-r--r--src/plugins/position/simulator/simulator.pro2
-rw-r--r--src/positioning/qdeclarativegeoaddress.cpp2
-rw-r--r--src/positioning/qgeoaddress.cpp2
-rw-r--r--tests/applications/declarative_map/map3d.qml4
-rw-r--r--tests/applications/declarative_map/map3d_mousetest.qml4
-rw-r--r--tests/auto/declarative_core/tst_category.qml2
-rw-r--r--tests/auto/declarative_core/tst_categorymodel.qml8
-rw-r--r--tests/auto/declarative_core/tst_contactdetail.qml2
-rw-r--r--tests/auto/declarative_core/tst_editorialmodel.qml4
-rw-r--r--tests/auto/declarative_core/tst_imagemodel.qml4
-rw-r--r--tests/auto/declarative_core/tst_map_routing.qml2
-rw-r--r--tests/auto/declarative_core/tst_place.qml26
-rw-r--r--tests/auto/declarative_core/tst_placeattribute.qml2
-rw-r--r--tests/auto/declarative_core/tst_placeicon.qml2
-rw-r--r--tests/auto/declarative_core/tst_placesearchmodel.qml12
-rw-r--r--tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml2
-rw-r--r--tests/auto/declarative_core/tst_plugin.qml2
-rw-r--r--tests/auto/declarative_core/tst_positionsource.qml4
-rw-r--r--tests/auto/declarative_core/tst_ratings.qml2
-rw-r--r--tests/auto/declarative_core/tst_reviewmodel.qml4
-rw-r--r--tests/auto/declarative_core/tst_supplier.qml2
-rw-r--r--tests/auto/declarative_core/tst_user.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_coordinateanimation.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_geocoding.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_item.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_item_details.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_item_fit_viewport.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_itemview.qml14
-rw-r--r--tests/auto/declarative_ui/tst_map_maptype.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_mouse.qml2
-rw-r--r--tests/auto/declarative_ui/tst_map_pinch_and_flick.qml217
-rw-r--r--tests/auto/qgeocodereply/tst_qgeocodereply.cpp2
-rw-r--r--tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp38
-rw-r--r--tests/auto/qgeoroutereply/tst_qgeoroutereply.cpp2
-rw-r--r--tests/auto/qgeosatelliteinfosource/testqgeosatelliteinfosource.cpp74
-rw-r--r--tests/auto/qmlinterface/data/TestAddress.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestCategory.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestContactDetail.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestIcon.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestLocation.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestPlace.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestPlaceAttribute.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestRatings.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestSupplier.qml2
-rw-r--r--tests/auto/qmlinterface/data/TestUser.qml2
-rw-r--r--tests/auto/qplace/tst_qplace.cpp2
-rw-r--r--tests/plugins/declarativetestplugin/declarativetestplugin.pro6
-rw-r--r--tests/plugins/imports.pri8
156 files changed, 948 insertions, 977 deletions
diff --git a/examples/location/mapviewer/content/dialogs/RouteDialog.qml b/examples/location/mapviewer/content/dialogs/RouteDialog.qml
index 73e5f3d1..e7be04ef 100644
--- a/examples/location/mapviewer/content/dialogs/RouteDialog.qml
+++ b/examples/location/mapviewer/content/dialogs/RouteDialog.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Dialog {
diff --git a/examples/location/mapviewer/content/map/3dItem.qml b/examples/location/mapviewer/content/map/3dItem.qml
index 4c190429..43126476 100644
--- a/examples/location/mapviewer/content/map/3dItem.qml
+++ b/examples/location/mapviewer/content/map/3dItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0;
-import QtLocation 5.0
+import QtLocation 5.3
import QtQuick 2.0
import Qt3D 2.0
import Qt3D.Shapes 2.0
diff --git a/examples/location/mapviewer/content/map/CircleItem.qml b/examples/location/mapviewer/content/map/CircleItem.qml
index d7f03402..df618d4c 100644
--- a/examples/location/mapviewer/content/map/CircleItem.qml
+++ b/examples/location/mapviewer/content/map/CircleItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
//TODO: remove/refactor me when items are integrated
diff --git a/examples/location/mapviewer/content/map/ImageItem.qml b/examples/location/mapviewer/content/map/ImageItem.qml
index 81e9f1c1..580799f0 100644
--- a/examples/location/mapviewer/content/map/ImageItem.qml
+++ b/examples/location/mapviewer/content/map/ImageItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0;
-import QtLocation 5.0
+import QtLocation 5.3
MapQuickItem { //to be used inside MapComponent only
id: imageItem
diff --git a/examples/location/mapviewer/content/map/MapComponent.qml b/examples/location/mapviewer/content/map/MapComponent.qml
index 505c795a..211e245f 100644
--- a/examples/location/mapviewer/content/map/MapComponent.qml
+++ b/examples/location/mapviewer/content/map/MapComponent.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import QtLocation.examples 5.0
diff --git a/examples/location/mapviewer/content/map/Marker.qml b/examples/location/mapviewer/content/map/Marker.qml
index 0e9f1537..0793f13e 100644
--- a/examples/location/mapviewer/content/map/Marker.qml
+++ b/examples/location/mapviewer/content/map/Marker.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0;
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
//! [mqi-top]
diff --git a/examples/location/mapviewer/content/map/MiniMap.qml b/examples/location/mapviewer/content/map/MiniMap.qml
index 5bee404c..90840980 100644
--- a/examples/location/mapviewer/content/map/MiniMap.qml
+++ b/examples/location/mapviewer/content/map/MiniMap.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Rectangle{
id: miniMapRect
diff --git a/examples/location/mapviewer/content/map/PolygonItem.qml b/examples/location/mapviewer/content/map/PolygonItem.qml
index 9b52bbca..d2734fdd 100644
--- a/examples/location/mapviewer/content/map/PolygonItem.qml
+++ b/examples/location/mapviewer/content/map/PolygonItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
//TODO: remove me when items are integrated
diff --git a/examples/location/mapviewer/content/map/PolylineItem.qml b/examples/location/mapviewer/content/map/PolylineItem.qml
index f065142e..48bcae3a 100644
--- a/examples/location/mapviewer/content/map/PolylineItem.qml
+++ b/examples/location/mapviewer/content/map/PolylineItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
//TODO: remove/refactor me when items are integrated
diff --git a/examples/location/mapviewer/content/map/RectangleItem.qml b/examples/location/mapviewer/content/map/RectangleItem.qml
index 1b58f468..6b81c017 100644
--- a/examples/location/mapviewer/content/map/RectangleItem.qml
+++ b/examples/location/mapviewer/content/map/RectangleItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
MapRectangle {
id: mapRectangle
diff --git a/examples/location/mapviewer/content/map/VideoItem.qml b/examples/location/mapviewer/content/map/VideoItem.qml
index a3df3c99..97963a1f 100644
--- a/examples/location/mapviewer/content/map/VideoItem.qml
+++ b/examples/location/mapviewer/content/map/VideoItem.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.0;
-import QtLocation 5.0
+import QtLocation 5.3
import QtMultimedia 5.0
// NOTE: If the creation of this compoment fails, make sure you have the latest
diff --git a/examples/location/mapviewer/mapviewer.qml b/examples/location/mapviewer/mapviewer.qml
index 59a5de5c..9481676a 100644
--- a/examples/location/mapviewer/mapviewer.qml
+++ b/examples/location/mapviewer/mapviewer.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import QtLocation.examples 5.0
import "content/map"
@@ -546,9 +546,9 @@ Item {
function createMap(provider){
var plugin
if (parameters.length>0)
- plugin = Qt.createQmlObject ('import QtLocation 5.0; Plugin{ name:"' + provider + '"; parameters: page.parameters}', page)
+ plugin = Qt.createQmlObject ('import QtLocation 5.3; Plugin{ name:"' + provider + '"; parameters: page.parameters}', page)
else
- plugin = Qt.createQmlObject ('import QtLocation 5.0; Plugin{ name:"' + provider + '"}', page)
+ plugin = Qt.createQmlObject ('import QtLocation 5.3; Plugin{ name:"' + provider + '"}', page)
if (plugin.supportsMapping()
&& plugin.supportsGeocoding(Plugin.ReverseGeocodingFeature)
&& plugin.supportsRouting()) {
@@ -558,7 +558,7 @@ Item {
minimap = null
}
- map = Qt.createQmlObject ('import QtLocation 5.0;\
+ map = Qt.createQmlObject ('import QtLocation 5.3;\
import "content/map";\
MapComponent{\
z : backgroundRect.z + 1;\
@@ -611,11 +611,11 @@ Item {
}
function getPlugins(){
- var plugin = Qt.createQmlObject ('import QtLocation 5.0; Plugin {}', page)
+ var plugin = Qt.createQmlObject ('import QtLocation 5.3; Plugin {}', page)
var tempPlugin
var myArray = new Array()
for (var i = 0; i<plugin.availableServiceProviders.length; i++){
- tempPlugin = Qt.createQmlObject ('import QtLocation 5.0; Plugin {name: "' + plugin.availableServiceProviders[i]+ '"}', page)
+ tempPlugin = Qt.createQmlObject ('import QtLocation 5.3; Plugin {name: "' + plugin.availableServiceProviders[i]+ '"}', page)
if (tempPlugin.supportsMapping()
&& tempPlugin.supportsGeocoding(Plugin.ReverseGeocodingFeature)
@@ -630,7 +630,7 @@ Item {
function setPluginParameters(pluginParameters) {
var parameters = new Array()
for (var prop in pluginParameters){
- var parameter = Qt.createQmlObject('import QtLocation 5.0; PluginParameter{ name: "'+ prop + '"; value: "' + pluginParameters[prop]+'"}',page)
+ var parameter = Qt.createQmlObject('import QtLocation 5.3; PluginParameter{ name: "'+ prop + '"; value: "' + pluginParameters[prop]+'"}',page)
parameters.push(parameter)
}
page.parameters=parameters
diff --git a/examples/location/places/content/places/CategoryDelegate.qml b/examples/location/places/content/places/CategoryDelegate.qml
index 4bb2b8e0..b9251721 100644
--- a/examples/location/places/content/places/CategoryDelegate.qml
+++ b/examples/location/places/content/places/CategoryDelegate.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Item {
diff --git a/examples/location/places/content/places/CategoryDialog.qml b/examples/location/places/content/places/CategoryDialog.qml
index 289d8501..1c122ff8 100644
--- a/examples/location/places/content/places/CategoryDialog.qml
+++ b/examples/location/places/content/places/CategoryDialog.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
InputDialog {
@@ -60,7 +60,7 @@ InputDialog {
//! [Category save]
onGoButtonClicked: {
- var modifiedCategory = category ? category : Qt.createQmlObject('import QtLocation 5.0; Category { }', page);
+ var modifiedCategory = category ? category : Qt.createQmlObject('import QtLocation 5.3; Category { }', page);
modifiedCategory.plugin = placesPlugin;
modifiedCategory.name = dialogModel.get(0).inputText;
diff --git a/examples/location/places/content/places/CategoryView.qml b/examples/location/places/content/places/CategoryView.qml
index 9b28e892..a4eed527 100644
--- a/examples/location/places/content/places/CategoryView.qml
+++ b/examples/location/places/content/places/CategoryView.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
diff --git a/examples/location/places/content/places/EditorialDelegate.qml b/examples/location/places/content/places/EditorialDelegate.qml
index fa33bcf0..95f6760b 100644
--- a/examples/location/places/content/places/EditorialDelegate.qml
+++ b/examples/location/places/content/places/EditorialDelegate.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
id: root
diff --git a/examples/location/places/content/places/EditorialPage.qml b/examples/location/places/content/places/EditorialPage.qml
index 60f175d3..e368a578 100644
--- a/examples/location/places/content/places/EditorialPage.qml
+++ b/examples/location/places/content/places/EditorialPage.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
anchors.fill: parent
diff --git a/examples/location/places/content/places/MapComponent.qml b/examples/location/places/content/places/MapComponent.qml
index 00ba9b2e..17400a2f 100644
--- a/examples/location/places/content/places/MapComponent.qml
+++ b/examples/location/places/content/places/MapComponent.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Map {
diff --git a/examples/location/places/content/places/OptionsDialog.qml b/examples/location/places/content/places/OptionsDialog.qml
index 7b7c9266..b90e58b9 100644
--- a/examples/location/places/content/places/OptionsDialog.qml
+++ b/examples/location/places/content/places/OptionsDialog.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Dialog {
diff --git a/examples/location/places/content/places/PlaceDelegate.qml b/examples/location/places/content/places/PlaceDelegate.qml
index 90a2cceb..225118db 100644
--- a/examples/location/places/content/places/PlaceDelegate.qml
+++ b/examples/location/places/content/places/PlaceDelegate.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
import "PlacesUtils.js" as PlacesUtils
diff --git a/examples/location/places/content/places/PlaceDialog.qml b/examples/location/places/content/places/PlaceDialog.qml
index ed08716d..ae7f55e6 100644
--- a/examples/location/places/content/places/PlaceDialog.qml
+++ b/examples/location/places/content/places/PlaceDialog.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Dialog {
@@ -52,7 +52,7 @@ Dialog {
function prepareDialog(inputPlace) {
if (!inputPlace) {
- locationPlace = Qt.createQmlObject('import QtLocation 5.0; Place { }', root);
+ locationPlace = Qt.createQmlObject('import QtLocation 5.3; Place { }', root);
__createdPlace = true;
} else {
locationPlace = inputPlace;
@@ -135,22 +135,22 @@ Dialog {
var c = QtPositioning.coordinate(parseFloat(dataFieldsModel.get(9).inputText),
parseFloat(dataFieldsModel.get(10).inputText));
locationPlace.location.coordinate = c;
- var phone = Qt.createQmlObject('import QtLocation 5.0; ContactDetail { }', locationPlace);
+ var phone = Qt.createQmlObject('import QtLocation 5.3; ContactDetail { }', locationPlace);
phone.label = "Phone";
phone.value = dataFieldsModel.get(11).inputText;
locationPlace.contactDetails.phone = phone;
- var fax = Qt.createQmlObject('import QtLocation 5.0; ContactDetail { }', locationPlace);
+ var fax = Qt.createQmlObject('import QtLocation 5.3; ContactDetail { }', locationPlace);
fax.label = "Fax";
fax.value = dataFieldsModel.get(12).inputText;
locationPlace.contactDetails.fax = fax;
- var email = Qt.createQmlObject('import QtLocation 5.0; ContactDetail { }', locationPlace);
+ var email = Qt.createQmlObject('import QtLocation 5.3; ContactDetail { }', locationPlace);
email.label = "Email";
email.value = dataFieldsModel.get(13).inputText;
locationPlace.contactDetails.email = email;
- var website = Qt.createQmlObject('import QtLocation 5.0; ContactDetail { }', locationPlace);
+ var website = Qt.createQmlObject('import QtLocation 5.3; ContactDetail { }', locationPlace);
website.label = "Website";
website.value = dataFieldsModel.get(14).inputText;
locationPlace.contactDetails.website = website;
diff --git a/examples/location/places/content/places/PlaceEditorials.qml b/examples/location/places/content/places/PlaceEditorials.qml
index 06cff09c..db6141a8 100644
--- a/examples/location/places/content/places/PlaceEditorials.qml
+++ b/examples/location/places/content/places/PlaceEditorials.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
anchors.fill: parent
diff --git a/examples/location/places/content/places/PlaceImages.qml b/examples/location/places/content/places/PlaceImages.qml
index be18a923..327a5769 100644
--- a/examples/location/places/content/places/PlaceImages.qml
+++ b/examples/location/places/content/places/PlaceImages.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
id: root
diff --git a/examples/location/places/content/places/PlaceReviews.qml b/examples/location/places/content/places/PlaceReviews.qml
index 3d54c52c..673f9769 100644
--- a/examples/location/places/content/places/PlaceReviews.qml
+++ b/examples/location/places/content/places/PlaceReviews.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
anchors.fill: parent
diff --git a/examples/location/places/content/places/ReviewDelegate.qml b/examples/location/places/content/places/ReviewDelegate.qml
index 50753e09..3cdb16b3 100644
--- a/examples/location/places/content/places/ReviewDelegate.qml
+++ b/examples/location/places/content/places/ReviewDelegate.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
id: root
diff --git a/examples/location/places/content/places/ReviewPage.qml b/examples/location/places/content/places/ReviewPage.qml
index c7287e19..89cf116e 100644
--- a/examples/location/places/content/places/ReviewPage.qml
+++ b/examples/location/places/content/places/ReviewPage.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
anchors.fill: parent
diff --git a/examples/location/places/content/places/SearchBox.qml b/examples/location/places/content/places/SearchBox.qml
index 335af339..35f0f7a8 100644
--- a/examples/location/places/content/places/SearchBox.qml
+++ b/examples/location/places/content/places/SearchBox.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Rectangle {
diff --git a/examples/location/places/content/places/SearchResultDelegate.qml b/examples/location/places/content/places/SearchResultDelegate.qml
index 76b64e83..cea8b471 100644
--- a/examples/location/places/content/places/SearchResultDelegate.qml
+++ b/examples/location/places/content/places/SearchResultDelegate.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import "PlacesUtils.js" as PlacesUtils
Item {
diff --git a/examples/location/places/content/places/SearchResultView.qml b/examples/location/places/content/places/SearchResultView.qml
index da62a5c5..ffe96c8d 100644
--- a/examples/location/places/content/places/SearchResultView.qml
+++ b/examples/location/places/content/places/SearchResultView.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
Item {
diff --git a/examples/location/places/places.qml b/examples/location/places/places.qml
index 4a144d55..3ed7a7cc 100644
--- a/examples/location/places/places.qml
+++ b/examples/location/places/places.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.examples 5.0
import "content/places"
@@ -264,7 +264,7 @@ Item {
searchRegionItem.destroy();
}
- searchRegionItem = Qt.createQmlObject('import QtLocation 5.0; MapRectangle { color: "red"; opacity: 0.4 }', page, "MapRectangle");
+ searchRegionItem = Qt.createQmlObject('import QtLocation 5.3; MapRectangle { color: "red"; opacity: 0.4 }', page, "MapRectangle");
searchRegionItem.topLeft = r.topLeft;
searchRegionItem.bottomRight = r.bottomRight;
map.addMapItem(searchRegionItem);
@@ -306,7 +306,7 @@ Item {
searchRegionItem.destroy();
}
- searchRegionItem = Qt.createQmlObject('import QtLocation 5.0; MapCircle { color: "red"; opacity: 0.4 }', page, "MapRectangle");
+ searchRegionItem = Qt.createQmlObject('import QtLocation 5.3; MapCircle { color: "red"; opacity: 0.4 }', page, "MapRectangle");
searchRegionItem.center = circle.center;
searchRegionItem.radius = circle.radius;
map.addMapItem(searchRegionItem);
@@ -336,7 +336,7 @@ Item {
onGoButtonClicked: {
/*if (isFavoritesEnabled) {
if (favoritesPlugin == null)
- favoritesPlugin = Qt.createQmlObject('import QtLocation 5.0; Plugin { name: "places_jsondb" }', page);
+ favoritesPlugin = Qt.createQmlObject('import QtLocation 5.3; Plugin { name: "places_jsondb" }', page);
favoritesPlugin.parameters = pluginParametersFromMap(pluginParameters);
placeSearchModel.favoritesPlugin = favoritesPlugin;
} else {
@@ -536,7 +536,7 @@ Item {
if (placesPlugin.supportsMapping()) {
mapPlugin = placesPlugin;
} else {
- mapPlugin = Qt.createQmlObject('import QtLocation 5.0; Plugin { required.mapping: Plugin.AnyMappingFeatures;' +
+ mapPlugin = Qt.createQmlObject('import QtLocation 5.3; Plugin { required.mapping: Plugin.AnyMappingFeatures;' +
'parameters: pluginParametersFromMap(pluginParameters) }', page);
}
@@ -547,10 +547,10 @@ Item {
}
function getPlacesPlugins() {
- var plugin = Qt.createQmlObject('import QtLocation 5.0; Plugin {}', page);
+ var plugin = Qt.createQmlObject('import QtLocation 5.3; Plugin {}', page);
var myArray = new Array;
for (var i = 0; i < plugin.availableServiceProviders.length; i++) {
- var tempPlugin = Qt.createQmlObject ('import QtLocation 5.0; Plugin {name: "' + plugin.availableServiceProviders[i]+ '"}', page)
+ var tempPlugin = Qt.createQmlObject ('import QtLocation 5.3; Plugin {name: "' + plugin.availableServiceProviders[i]+ '"}', page)
if (tempPlugin.supportsPlaces())
myArray.push(tempPlugin.name)
@@ -562,7 +562,7 @@ Item {
function pluginParametersFromMap(pluginParameters) {
var parameters = new Array()
for (var prop in pluginParameters){
- var parameter = Qt.createQmlObject('import QtLocation 5.0; PluginParameter{ name: "'+ prop + '"; value: "' + pluginParameters[prop]+'"}',page)
+ var parameter = Qt.createQmlObject('import QtLocation 5.3; PluginParameter{ name: "'+ prop + '"; value: "' + pluginParameters[prop]+'"}',page)
parameters.push(parameter)
}
return parameters
diff --git a/examples/location/places_list/places_list.qml b/examples/location/places_list/places_list.qml
index d3911d3c..45c4712f 100644
--- a/examples/location/places_list/places_list.qml
+++ b/examples/location/places_list/places_list.qml
@@ -41,7 +41,7 @@
//! [Imports]
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
//! [Imports]
Rectangle {
diff --git a/examples/location/places_map/places_map.qml b/examples/location/places_map/places_map.qml
index 87a254a8..e6ceafe8 100644
--- a/examples/location/places_map/places_map.qml
+++ b/examples/location/places_map/places_map.qml
@@ -41,7 +41,7 @@
//! [Imports]
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
//! [Imports]
Rectangle {
diff --git a/src/3rdparty/poly2tri/sweep/sweep.cpp b/src/3rdparty/poly2tri/sweep/sweep.cpp
index 4df63038..902c0295 100644
--- a/src/3rdparty/poly2tri/sweep/sweep.cpp
+++ b/src/3rdparty/poly2tri/sweep/sweep.cpp
@@ -789,7 +789,7 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
// flip with new edge op->eq
FlipEdgeEvent(tcx, eq, op, &ot, op);
// TODO: Actually I just figured out that it should be possible to
- // improve this by getting the next ot and op before the the above
+ // improve this by getting the next ot and op before the above
// flip and continue the flipScanEdgeEvent here
// set new ot and op here and loop back to inScanArea test
// also need to set a new flip_triangle first
diff --git a/src/3rdparty/poly2tri/sweep/sweep_context.h b/src/3rdparty/poly2tri/sweep/sweep_context.h
index 482ab795..cd9a037c 100644
--- a/src/3rdparty/poly2tri/sweep/sweep_context.h
+++ b/src/3rdparty/poly2tri/sweep/sweep_context.h
@@ -38,7 +38,7 @@
namespace p2t {
-// Inital triangle factor, seed triangle will extend 30% of
+// Initial triangle factor, seed triangle will extend 30% of
// PointSet width to both left and right.
const float kAlpha = float(0.3);
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
index 985de8db..ce57d335 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
@@ -1187,7 +1187,7 @@ QPlaceManager *QDeclarativePlace::manager()
}
if (!m_plugin) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, PLUGIN_NOT_ASSIGNED_TO_PLACE);
+ qmlInfo(this) << QStringLiteral("Plugin is not assigned to place.");
return 0;
}
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp
index a2906916..ae42b626 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp
@@ -221,7 +221,7 @@ void QDeclarativePlaceIcon::pluginReady()
QPlaceManager *QDeclarativePlaceIcon::manager() const
{
if (!m_plugin) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, PLUGIN_NOT_ASSIGNED_TO_PLACE_ICON);
+ qmlInfo(this) << QStringLiteral("Plugin is not assigned to place.");
return 0;
}
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp
index cfff8d2e..8e939ae3 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp
@@ -158,7 +158,7 @@ QT_USE_NAMESPACE
Updates the model based on the provided query parameters. The model will be populated with a
list of search suggestions for the partial \l searchTerm and \l searchArea. If the \l plugin
- supports it, other paramaters such as \l limit and \l offset may be specified. \c update()
+ supports it, other parameters such as \l limit and \l offset may be specified. \c update()
submits the set of parameters to the \l plugin to process.
diff --git a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
index 38a73f2e..7d50af7e 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
@@ -111,7 +111,7 @@ QT_USE_NAMESPACE
\qmlmethod string QtLocation::CategoryModel::data(ModelIndex index, int role)
\internal
- This method retrieves the the model's data per \a index and \a role.
+ This method retrieves the model's data per \a index and \a role.
*/
/*!
@@ -263,12 +263,12 @@ void QDeclarativeSupportedCategoriesModel::setPlugin(QDeclarativeGeoServiceProvi
if (serviceProvider) {
QPlaceManager *placeManager = serviceProvider->placeManager();
if (placeManager) {
- disconnect(placeManager, SIGNAL(categoryAdded(QPlaceCategory, QString)),
- this, SLOT(addedCategory(QPlaceCategory, QString)));
- disconnect(placeManager, SIGNAL(categoryUpdated(QPlaceCategory, QString)),
- this, SLOT(updatedCategory(QPlaceCategory, QString)));
- disconnect(placeManager, SIGNAL(categoryRemoved(QString, QString)),
- this, SLOT(removedCategory(QString, QString)));
+ disconnect(placeManager, SIGNAL(categoryAdded(QPlaceCategory,QString)),
+ this, SLOT(addedCategory(QPlaceCategory,QString)));
+ disconnect(placeManager, SIGNAL(categoryUpdated(QPlaceCategory,QString)),
+ this, SLOT(updatedCategory(QPlaceCategory,QString)));
+ disconnect(placeManager, SIGNAL(categoryRemoved(QString,QString)),
+ this, SLOT(removedCategory(QString,QString)));
disconnect(placeManager, SIGNAL(dataChanged()),
this, SIGNAL(dataChanged()));
}
@@ -479,12 +479,12 @@ void QDeclarativeSupportedCategoriesModel::connectNotificationSignals()
// listen for any category notifications so that we can reupdate the categories
// model.
- connect(placeManager, SIGNAL(categoryAdded(QPlaceCategory, QString)),
- this, SLOT(addedCategory(QPlaceCategory, QString)));
- connect(placeManager, SIGNAL(categoryUpdated(QPlaceCategory, QString)),
- this, SLOT(updatedCategory(QPlaceCategory, QString)));
- connect(placeManager, SIGNAL(categoryRemoved(QString, QString)),
- this, SLOT(removedCategory(QString, QString)));
+ connect(placeManager, SIGNAL(categoryAdded(QPlaceCategory,QString)),
+ this, SLOT(addedCategory(QPlaceCategory,QString)));
+ connect(placeManager, SIGNAL(categoryUpdated(QPlaceCategory,QString)),
+ this, SLOT(updatedCategory(QPlaceCategory,QString)));
+ connect(placeManager, SIGNAL(categoryRemoved(QString,QString)),
+ this, SLOT(removedCategory(QString,QString)));
connect(placeManager, SIGNAL(dataChanged()),
this, SIGNAL(dataChanged()));
}
diff --git a/src/imports/location/error_messages.cpp b/src/imports/location/error_messages.cpp
index 208a1d32..7a400fff 100644
--- a/src/imports/location/error_messages.cpp
+++ b/src/imports/location/error_messages.cpp
@@ -44,47 +44,18 @@ QT_BEGIN_NAMESPACE
const char CONTEXT_NAME[] = "QtLocationQML";
-const char PLUGIN_DOESNOT_SUPPORT_ROUTING[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error: Plugin does not support routing.\nError message: %1");
-const char PLUGIN_DOESNOT_SUPPORT_MAPPING[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error: Plugin does not support mapping.\nError message: %1");
-const char PLUGIN_DOESNOT_SUPPORT_GEOCODING[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error: Plugin does not support (reverse) geocoding.\nError message: %1");
+//to-be-translated error string
-const char NOT_SUPPORTED_BY[] = QT_TRANSLATE_NOOP("QtLocationQML", "%1 not supported by %2 plugin.");
const char PLUGIN_PROPERTY_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin property is not set.");
const char PLUGIN_ERROR[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin Error (%1): %2");
-const char PLUGIN_PROVIDER_ERROR[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin Error (%1): Could not instantiate provider %1");
+const char PLUGIN_PROVIDER_ERROR[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin Error (%1): Could not instantiate provider");
const char PLUGIN_NOT_VALID[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin is not valid");
-const char PLUGIN_NOT_ASSIGNED_TO_PLACE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin is not assigned to place.");
-const char PLUGIN_NOT_ASSIGNED_TO_PLACE_ICON[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin is not assigned to place icon.");
const char CATEGORIES_NOT_INITIALIZED[] = QT_TRANSLATE_NOOP("QtLocationQML", "Unable to initialize categories");
-const char NOT_INSTANTIABLE_BY_DEVELOPER[] = QT_TRANSLATE_NOOP("QtLocationQML", "%1 is not intended instantiable by developer.");
-
-const char UNSUPPORTED_BOUND_TYPE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Unsupported bound type (Box and Circle supported)");
-const char UNSUPPORTED_QUERY_TYPE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Unsupported query type for geocode model (coordinate, string and Address supported).");
-const char PLUGIN_SET_ONCE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Plugin is a write-once property, and cannot be set again.");
-
-const char PINCH_ROTATE_GESTURE_ACTIVATED[] = QT_TRANSLATE_NOOP("QtLocationQML", "Pinchrotation gesture activated. Note that it is experimental feature.");
-const char PINCH_TILT_GESTURE_ACTIVATED[] = QT_TRANSLATE_NOOP("QtLocationQML", "Pinchtilt gesture activated. Note that it is experimental feature.");
-
-const char INDEX_INVALID[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error, invalid index for get(): %1");
-const char INDEX_OUT_OF_RANGE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error, too big or small index in get(): %1");
-
-const char MODEL_INDEX_INVALID[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error in indexing route model's data (invalid index).");
-const char MODEL_INDEX_OUT_OF_RANGE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Fatal error in indexing route model's data (index overflow).");
-
-const char GEOCODE_PLUGIN_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot geocode, plugin not set.");
-const char GEOCODE_MGR_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot geocode, geocode manager not set.");
-const char GEOCODE_QUERY_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot geocode, valid query not set.");
-
-const char ROUTE_PLUGIN_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot route, plugin not set.");
-const char ROUTE_MGR_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot route, route manager not set.");
-const char ROUTE_QUERY_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot route, valid query not set.");
-const char ROUTE_WAYPOINTS_NOT_SET[] = QT_TRANSLATE_NOOP("QtLocationQML", "Not enough waypoints for routing.");
-
-const char CANNOT_REMOVE_AREA[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot remove nonexistent area.");
-const char CANNOT_ADD_INVALID_WAYPOINT[] = QT_TRANSLATE_NOOP("QtLocationQML", "Not adding invalid waypoint.");
-const char CANNOT_REMOVE_WAYPOINT[] = QT_TRANSLATE_NOOP("QtLocationQML", "Cannot remove nonexistent waypoint.");
-const char COORD_NOT_BELONG_TO[] = QT_TRANSLATE_NOOP("QtLocationQML", "Coordinate does not belong to %1");
-const char MISSED_NMEA_FILE[] = QT_TRANSLATE_NOOP("QtLocationQML", "Nmea file not found.");
const char UNABLE_TO_MAKE_REQUEST[]= QT_TRANSLATE_NOOP("QtLocationQML", "Unable to create request");
+//often used but only visible to developer -> no translation required
+const char ROUTE_PLUGIN_NOT_SET[] = "Cannot route, plugin not set.";
+const char ROUTE_MGR_NOT_SET[] = "Cannot route, route manager not set.";
+const char COORD_NOT_BELONG_TO[] = "Coordinate does not belong to %1";
+
QT_END_NAMESPACE
diff --git a/src/imports/location/error_messages.h b/src/imports/location/error_messages.h
index 07da92e9..62a71442 100644
--- a/src/imports/location/error_messages.h
+++ b/src/imports/location/error_messages.h
@@ -1,4 +1,3 @@
-
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
@@ -48,45 +47,17 @@ QT_BEGIN_NAMESPACE
extern const char CONTEXT_NAME[];
-extern const char PLUGIN_DOESNOT_SUPPORT_MAPPING[];
-extern const char PLUGIN_DOESNOT_SUPPORT_ROUTING[];
-extern const char PLUGIN_DOESNOT_SUPPORT_GEOCODING[];
-
extern const char PLUGIN_PROPERTY_NOT_SET[];
extern const char PLUGIN_ERROR[];
extern const char PLUGIN_PROVIDER_ERROR[];
extern const char PLUGIN_NOT_VALID[];
-extern const char PLUGIN_NOT_ASSIGNED_TO_PLACE[];
-extern const char PLUGIN_NOT_ASSIGNED_TO_PLACE_ICON[];
-extern const char CATEGORIES_NOT_INITIALIZED[];
-extern const char NOT_INSTANTIABLE_BY_DEVELOPER[];
-
-extern const char UNSUPPORTED_BOUND_TYPE[];
-extern const char UNSUPPORTED_QUERY_TYPE[];
-extern const char PLUGIN_SET_ONCE[];
-extern const char PINCH_ROTATE_GESTURE_ACTIVATED[];
-extern const char PINCH_TILT_GESTURE_ACTIVATED[];
-
-extern const char INDEX_INVALID[];
-extern const char INDEX_OUT_OF_RANGE[];
-extern const char MODEL_INDEX_INVALID[];
-extern const char MODEL_INDEX_OUT_OF_RANGE[];
-
-extern const char GEOCODE_PLUGIN_NOT_SET[];
-extern const char GEOCODE_MGR_NOT_SET[];
-extern const char GEOCODE_QUERY_NOT_SET[];
+extern const char CATEGORIES_NOT_INITIALIZED[];
extern const char ROUTE_PLUGIN_NOT_SET[];
extern const char ROUTE_MGR_NOT_SET[];
-extern const char ROUTE_QUERY_NOT_SET[];
-extern const char ROUTE_WAYPOINTS_NOT_SET[];
-extern const char CANNOT_REMOVE_AREA[];
-extern const char CANNOT_ADD_INVALID_WAYPOINT[];
-extern const char CANNOT_REMOVE_WAYPOINT[];
extern const char COORD_NOT_BELONG_TO[];
-extern const char MISSED_NMEA_FILE[];
extern const char UNABLE_TO_MAKE_REQUEST[];
QT_END_NAMESPACE
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp
index 9f68178e..8af789b8 100644
--- a/src/imports/location/location.cpp
+++ b/src/imports/location/location.cpp
@@ -91,59 +91,74 @@ class QLocationDeclarativeModule: public QQmlExtensionPlugin
public:
virtual void registerTypes(const char *uri)
{
- if (QLatin1String(uri) == QLatin1String("QtMobility.location")) {
- qWarning("QtMobility.location is not supported. Use QtLocation instead.");
- } else if (QLatin1String(uri) == QLatin1String("Qt.location")) {
- qWarning("Qt.location is not supported. Use QtLocation instead.");
- } else if (QLatin1String(uri) == QLatin1String("QtLocation")) {
-
- // @uri QtLocation 5.0
-
- qmlRegisterType<QDeclarativeGeoServiceProvider>(uri, 5, 0, "Plugin");
- qmlRegisterType<QDeclarativeGeoServiceProviderParameter>(uri, 5, 0, "PluginParameter");
- qmlRegisterUncreatableType<QDeclarativeGeoServiceProviderRequirements>(uri, 5, 0, "PluginRequirements", QCoreApplication::translate(CONTEXT_NAME, NOT_INSTANTIABLE_BY_DEVELOPER).arg("PluginRequirements"));
- qmlRegisterType<QDeclarativeGeoMap>(uri, 5, 0, "Map");
-
- qmlRegisterUncreatableType<QDeclarativeGeoMapItemBase>(uri, 5, 0, "GeoMapItemBase", QCoreApplication::translate(CONTEXT_NAME, NOT_INSTANTIABLE_BY_DEVELOPER).arg("GeoMapItemBase"));
- qmlRegisterType<QDeclarativeGeoMapQuickItem>(uri, 5, 0, "MapQuickItem");
- qmlRegisterType<QDeclarativeGeoMapItemView>(uri, 5, 0, "MapItemView");
-
- qmlRegisterType<QDeclarativeGeocodeModel>(uri, 5, 0, "GeocodeModel"); // geocoding and reverse geocoding
- qmlRegisterType<QDeclarativeGeoRouteModel>(uri, 5, 0, "RouteModel");
- qmlRegisterType<QDeclarativeGeoRouteQuery>(uri, 5, 0, "RouteQuery");
- qmlRegisterType<QDeclarativeGeoRoute>(uri, 5, 0, "Route"); // data type
- qmlRegisterType<QDeclarativeGeoRouteSegment>(uri, 5, 0, "RouteSegment");
- qmlRegisterType<QDeclarativeGeoManeuver>(uri, 5, 0, "RouteManeuver");
- qmlRegisterUncreatableType<QDeclarativeGeoMapPinchEvent>(uri, 5, 0, "MapPinchEvent", QCoreApplication::translate(CONTEXT_NAME, NOT_INSTANTIABLE_BY_DEVELOPER).arg("(Map)PinchEvent"));
- qmlRegisterUncreatableType<QDeclarativeGeoMapGestureArea>(uri, 5, 0, "MapGestureArea", QCoreApplication::translate(CONTEXT_NAME, NOT_INSTANTIABLE_BY_DEVELOPER).arg("(Map)GestureArea"));
- qmlRegisterUncreatableType<QDeclarativeGeoMapType>(uri, 5, 0, "MapType", QCoreApplication::translate(CONTEXT_NAME, NOT_INSTANTIABLE_BY_DEVELOPER).arg("MapType"));
- qmlRegisterType<QDeclarativeCategory>(uri, 5, 0, "Category");
- qmlRegisterType<QDeclarativePlaceEditorialModel>(uri, 5, 0, "EditorialModel");
- qmlRegisterType<QDeclarativePlaceImageModel>(uri, 5, 0, "ImageModel");
- qmlRegisterType<QDeclarativePlace>(uri, 5, 0, "Place");
- qmlRegisterType<QDeclarativePlaceIcon>(uri, 5, 0, "Icon");
- qmlRegisterType<QDeclarativeRatings>(uri, 5, 0, "Ratings");
- qmlRegisterType<QDeclarativeReviewModel>(uri, 5, 0, "ReviewModel");
- qmlRegisterType<QDeclarativeSupplier>(uri, 5, 0, "Supplier");
- qmlRegisterType<QDeclarativePlaceUser>(uri, 5, 0, "User");
- qmlRegisterType<QDeclarativeRectangleMapItem>(uri, 5, 0, "MapRectangle");
- qmlRegisterType<QDeclarativeCircleMapItem>(uri, 5, 0, "MapCircle");
+ if (QLatin1String(uri) == QLatin1String("QtLocation")) {
+
+ // @uri QtLocation
+ int major = 5;
+ int minor = 0;
+
+ // Register the 5.0 types
+ // 5.0 is siltent and not advertised
+
+ qmlRegisterType<QDeclarativeGeoServiceProvider >(uri, major, minor, "Plugin");
+ qmlRegisterType<QDeclarativeGeoServiceProviderParameter >(uri, major, minor, "PluginParameter");
+ qmlRegisterUncreatableType<QDeclarativeGeoServiceProviderRequirements>(uri, major, minor, "PluginRequirements",
+ QStringLiteral("PluginRequirements is not intended instantiable by developer."));
+ qmlRegisterType<QDeclarativeGeoMap >(uri, major, minor, "Map");
+
+ qmlRegisterUncreatableType<QDeclarativeGeoMapItemBase >(uri, major, minor, "GeoMapItemBase",
+ QStringLiteral("HeoMapItemBase is not intended instantiable by developer."));
+ qmlRegisterType<QDeclarativeGeoMapQuickItem >(uri, major, minor, "MapQuickItem");
+ qmlRegisterType<QDeclarativeGeoMapItemView >(uri, major, minor, "MapItemView");
+
+ qmlRegisterType<QDeclarativeGeocodeModel >(uri, major, minor, "GeocodeModel"); // geocoding and reverse geocoding
+ qmlRegisterType<QDeclarativeGeoRouteModel >(uri, major, minor, "RouteModel");
+ qmlRegisterType<QDeclarativeGeoRouteQuery >(uri, major, minor, "RouteQuery");
+ qmlRegisterType<QDeclarativeGeoRoute >(uri, major, minor, "Route"); // data type
+ qmlRegisterType<QDeclarativeGeoRouteSegment >(uri, major, minor, "RouteSegment");
+ qmlRegisterType<QDeclarativeGeoManeuver >(uri, major, minor, "RouteManeuver");
+ qmlRegisterUncreatableType<QDeclarativeGeoMapPinchEvent >(uri, major, minor, "MapPinchEvent",
+ QStringLiteral("(Map)PinchEvent is not intended instantiable by developer."));
+ qmlRegisterUncreatableType<QDeclarativeGeoMapGestureArea>(uri, major, minor, "MapGestureArea",
+ QStringLiteral("(Map)HestureArea is not intended instantiable by developer."));
+ qmlRegisterUncreatableType<QDeclarativeGeoMapType >(uri, major, minor, "MapType",
+ QStringLiteral("MapType is not intended instantiable by developer."));
+ qmlRegisterType<QDeclarativeCategory >(uri, major, minor, "Category");
+ qmlRegisterType<QDeclarativePlaceEditorialModel >(uri, major, minor, "EditorialModel");
+ qmlRegisterType<QDeclarativePlaceImageModel >(uri, major, minor, "ImageModel");
+ qmlRegisterType<QDeclarativePlace >(uri, major, minor, "Place");
+ qmlRegisterType<QDeclarativePlaceIcon >(uri, major, minor, "Icon");
+ qmlRegisterType<QDeclarativeRatings >(uri, major, minor, "Ratings");
+ qmlRegisterType<QDeclarativeReviewModel >(uri, major, minor, "ReviewModel");
+ qmlRegisterType<QDeclarativeSupplier >(uri, major, minor, "Supplier");
+ qmlRegisterType<QDeclarativePlaceUser >(uri, major, minor, "User");
+ qmlRegisterType<QDeclarativeRectangleMapItem >(uri, major, minor, "MapRectangle");
+ qmlRegisterType<QDeclarativeCircleMapItem >(uri, major, minor, "MapCircle");
qmlRegisterType<QDeclarativeMapLineProperties>();
- qmlRegisterType<QDeclarativePolylineMapItem>(uri, 5, 0, "MapPolyline");
- qmlRegisterType<QDeclarativePolygonMapItem>(uri, 5, 0, "MapPolygon");
- qmlRegisterType<QDeclarativeRouteMapItem>(uri, 5, 0, "MapRoute");
-
- qmlRegisterType<QDeclarativeSupportedCategoriesModel>(uri, 5, 0, "CategoryModel");
- qmlRegisterType<QDeclarativeSearchResultModel>(uri, 5, 0, "PlaceSearchModel");
- qmlRegisterType<QDeclarativeSearchSuggestionModel>(uri, 5, 0, "PlaceSearchSuggestionModel");
- qmlRegisterType<QDeclarativePlaceAttribute>(uri, 5,0, "PlaceAttribute");
- qmlRegisterUncreatableType<QQmlPropertyMap>(uri, 5, 0, "ExtendedAttributes", "ExtendedAttributes instances cannot be instantiated. "
+ qmlRegisterType<QDeclarativePolylineMapItem >(uri, major, minor, "MapPolyline");
+ qmlRegisterType<QDeclarativePolygonMapItem >(uri, major, minor, "MapPolygon");
+ qmlRegisterType<QDeclarativeRouteMapItem >(uri, major, minor, "MapRoute");
+
+ qmlRegisterType<QDeclarativeSupportedCategoriesModel >(uri, major, minor, "CategoryModel");
+ qmlRegisterType<QDeclarativeSearchResultModel >(uri, major, minor, "PlaceSearchModel");
+ qmlRegisterType<QDeclarativeSearchSuggestionModel >(uri, major, minor, "PlaceSearchSuggestionModel");
+ qmlRegisterType<QDeclarativePlaceAttribute >(uri, major, minor, "PlaceAttribute");
+ qmlRegisterUncreatableType<QQmlPropertyMap >(uri, major, minor, "ExtendedAttributes", "ExtendedAttributes instances cannot be instantiated. "
"Only Place types have ExtendedAttributes and they cannot be re-assigned "
"(but can be modified).");
- qmlRegisterType<QDeclarativeContactDetail>(uri, 5, 0, "ContactDetail");
- qmlRegisterUncreatableType<QDeclarativeContactDetails>(uri, 5, 0, "ContactDetails", "ContactDetails instances cannot be instantiated. "
+ qmlRegisterType<QDeclarativeContactDetail >(uri, major, minor, "ContactDetail");
+ qmlRegisterUncreatableType<QDeclarativeContactDetails >(uri, major, minor, "ContactDetails", "ContactDetails instances cannot be instantiated. "
"Only Place types have ContactDetails and they cannot "
"be re-assigned (but can be modified).");
+
+ // Register the 5.3 types
+ // Introduction of 5.3 version; existing 5.0 exports automatically become available under 5.3 as well
+ // 5.3 is committed QML API despite missing release of QtLocation 5.3
+ minor = 3;
+ // For now there are no new types; just reregister one existing 5.0 type
+ qmlRegisterType<QDeclarativeGeoServiceProvider >(uri, major, minor, "Plugin");
+
+ //registrations below are version independent
qRegisterMetaType<QPlaceCategory>("QPlaceCategory");
qRegisterMetaType<QPlace>("QPlace");
qRegisterMetaType<QPlaceIcon>("QPlaceIcon");
diff --git a/src/imports/location/plugins.qmltypes b/src/imports/location/plugins.qmltypes
index c4319665..ffdbd7c8 100644
--- a/src/imports/location/plugins.qmltypes
+++ b/src/imports/location/plugins.qmltypes
@@ -3,7 +3,8 @@ import QtQuick.tooling 1.1
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
-// This file was auto-generated with the command 'qmlplugindump -notrelocatable QtLocation 5.0'.
+// This file was auto-generated by:
+// 'qmlplugindump -notrelocatable QtLocation 5.3'
Module {
Component {
@@ -85,6 +86,7 @@ Module {
name: "QDeclarativeContactDetails"
prototype: "QQmlPropertyMap"
exports: ["QtLocation/ContactDetails 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
}
Component {
@@ -131,8 +133,8 @@ Module {
isPointer: true
}
Property { name: "plugin"; type: "QDeclarativeGeoServiceProvider"; isPointer: true }
- Property { name: "minimumZoomLevel"; type: "double"; isReadonly: true }
- Property { name: "maximumZoomLevel"; type: "double"; isReadonly: true }
+ Property { name: "minimumZoomLevel"; type: "double" }
+ Property { name: "maximumZoomLevel"; type: "double" }
Property { name: "zoomLevel"; type: "double" }
Property { name: "activeMapType"; type: "QDeclarativeGeoMapType"; isPointer: true }
Property {
@@ -143,8 +145,6 @@ Module {
}
Property { name: "center"; type: "QGeoCoordinate" }
Property { name: "mapItems"; type: "QList<QObject*>"; isReadonly: true }
- Property { name: "tilt"; type: "double" }
- Property { name: "bearing"; type: "double" }
Signal {
name: "wheelAngleChanged"
Parameter { name: "angleDelta"; type: "QPoint" }
@@ -158,14 +158,6 @@ Module {
Parameter { name: "zoomLevel"; type: "double" }
}
Signal {
- name: "bearingChanged"
- Parameter { name: "bearing"; type: "double" }
- }
- Signal {
- name: "tiltChanged"
- Parameter { name: "tilt"; type: "double" }
- }
- Signal {
name: "centerChanged"
Parameter { name: "coordinate"; type: "QGeoCoordinate" }
}
@@ -188,6 +180,10 @@ Module {
type: "QPointF"
Parameter { name: "coordinate"; type: "QGeoCoordinate" }
}
+ Method {
+ name: "fitViewportToGeoShape"
+ Parameter { name: "shape"; type: "QVariant" }
+ }
Method { name: "fitViewportToMapItems" }
Method {
name: "pan"
@@ -200,16 +196,15 @@ Module {
name: "QDeclarativeGeoMapGestureArea"
prototype: "QObject"
exports: ["QtLocation/MapGestureArea 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "ActiveGesture"
values: {
"NoGesture": 0,
"ZoomGesture": 1,
- "RotationGesture": 2,
- "TiltGesture": 4,
- "PanGesture": 8,
- "FlickGesture": 16
+ "PanGesture": 2,
+ "FlickGesture": 4
}
}
Enum {
@@ -217,20 +212,17 @@ Module {
values: {
"NoGesture": 0,
"ZoomGesture": 1,
- "RotationGesture": 2,
- "TiltGesture": 4,
- "PanGesture": 8,
- "FlickGesture": 16
+ "PanGesture": 2,
+ "FlickGesture": 4
}
}
Property { name: "enabled"; type: "bool" }
Property { name: "pinchEnabled"; type: "bool" }
Property { name: "panEnabled"; type: "bool" }
- Property { name: "isPinchActive"; type: "bool" }
+ Property { name: "isPinchActive"; type: "bool"; isReadonly: true }
Property { name: "isPanActive"; type: "bool"; isReadonly: true }
Property { name: "activeGestures"; type: "ActiveGestures" }
Property { name: "maximumZoomLevelChange"; type: "double" }
- Property { name: "rotationFactor"; type: "double" }
Property { name: "flickDeceleration"; type: "double" }
Signal { name: "pinchActiveChanged" }
Signal {
@@ -256,6 +248,7 @@ Module {
defaultProperty: "data"
prototype: "QQuickItem"
exports: ["QtLocation/GeoMapItemBase 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
}
Component {
@@ -268,35 +261,10 @@ Module {
Property { name: "autoFitViewport"; type: "bool" }
}
Component {
- name: "QDeclarativeGeoMapMouseArea"
- defaultProperty: "data"
- prototype: "QQuickMouseArea"
- exports: ["QtLocation/MapMouseArea 5.0"]
- exportMetaObjectRevisions: [0]
- Method {
- name: "mouseToCoordinate"
- type: "QGeoCoordinate"
- Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
- }
- }
- Component {
- name: "QDeclarativeGeoMapMouseEvent"
- prototype: "QObject"
- exports: ["QtLocation/MapMouseEvent 5.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "accepted"; type: "bool" }
- Property { name: "button"; type: "int"; isReadonly: true }
- Property { name: "buttons"; type: "int"; isReadonly: true }
- Property { name: "modifiers"; type: "int"; isReadonly: true }
- Property { name: "wasHeld"; type: "bool"; isReadonly: true }
- Property { name: "x"; type: "int"; isReadonly: true }
- Property { name: "y"; type: "int"; isReadonly: true }
- Property { name: "coordinate"; type: "QGeoCoordinate"; isReadonly: true }
- }
- Component {
name: "QDeclarativeGeoMapPinchEvent"
prototype: "QObject"
exports: ["QtLocation/MapPinchEvent 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Property { name: "center"; type: "QPointF"; isReadonly: true }
Property { name: "angle"; type: "double"; isReadonly: true }
@@ -320,6 +288,7 @@ Module {
name: "QDeclarativeGeoMapType"
prototype: "QObject"
exports: ["QtLocation/MapType 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "MapStyle"
@@ -332,6 +301,8 @@ Module {
"HybridMap": 5,
"TransitMap": 6,
"GrayStreetMap": 7,
+ "PedestrianMap": 8,
+ "CarNavigationMap": 9,
"CustomMap": 100
}
}
@@ -383,6 +354,7 @@ Module {
Property { name: "status"; type: "Status"; isReadonly: true }
Property { name: "errorString"; type: "string"; isReadonly: true }
Property { name: "error"; type: "RouteError"; isReadonly: true }
+ Property { name: "measurementSystem"; type: "QLocale::MeasurementSystem" }
Signal { name: "routesChanged" }
Method { name: "update" }
Method {
@@ -541,8 +513,8 @@ Module {
name: "QDeclarativeGeoServiceProvider"
defaultProperty: "parameters"
prototype: "QObject"
- exports: ["QtLocation/Plugin 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtLocation/Plugin 5.0", "QtLocation/Plugin 5.3"]
+ exportMetaObjectRevisions: [0, 0]
Enum {
name: "RoutingFeature"
values: {
@@ -723,6 +695,7 @@ Module {
name: "QDeclarativeGeoServiceProviderRequirements"
prototype: "QObject"
exports: ["QtLocation/PluginRequirements 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Property { name: "mapping"; type: "QDeclarativeGeoServiceProvider::MappingFeatures" }
Property { name: "routing"; type: "QDeclarativeGeoServiceProvider::RoutingFeatures" }
@@ -1063,13 +1036,16 @@ Module {
}
Property { name: "plugin"; type: "QDeclarativeGeoServiceProvider"; isPointer: true }
Property { name: "searchArea"; type: "QVariant" }
- Property { name: "offset"; type: "int" }
Property { name: "limit"; type: "int" }
+ Property { name: "previousPagesAvailable"; type: "bool"; isReadonly: true }
+ Property { name: "nextPagesAvailable"; type: "bool"; isReadonly: true }
Property { name: "status"; type: "Status"; isReadonly: true }
Method { name: "update" }
Method { name: "cancel" }
Method { name: "reset" }
Method { name: "errorString"; type: "string" }
+ Method { name: "previousPage" }
+ Method { name: "nextPage" }
}
Component {
name: "QDeclarativeSearchResultModel"
@@ -1170,6 +1146,7 @@ Module {
name: "QQmlPropertyMap"
prototype: "QObject"
exports: ["QtLocation/ExtendedAttributes 5.0"]
+ isCreatable: false
exportMetaObjectRevisions: [0]
Signal {
name: "valueChanged"
diff --git a/src/imports/location/qdeclarativecirclemapitem.cpp b/src/imports/location/qdeclarativecirclemapitem.cpp
index f26995b3..a91b26bd 100644
--- a/src/imports/location/qdeclarativecirclemapitem.cpp
+++ b/src/imports/location/qdeclarativecirclemapitem.cpp
@@ -136,8 +136,7 @@ struct Vertex
QVector2D position;
};
-QGeoMapCircleGeometry::QGeoMapCircleGeometry(QObject *parent) :
- QGeoMapPolygonGeometry(parent)
+QGeoMapCircleGeometry::QGeoMapCircleGeometry()
{
}
@@ -215,7 +214,7 @@ void QGeoMapCircleGeometry::updateScreenPointsInvert(const QGeoMap &map)
p2t::Triangle *t = tris.at(i);
for (int j = 0; j < 3; ++j) {
p2t::Point *p = t->GetPoint(j);
- screenVertices_ << Point(p->x, p->y);
+ screenVertices_ << QPointF(p->x, p->y);
}
}
delete cdt;
diff --git a/src/imports/location/qdeclarativecirclemapitem_p.h b/src/imports/location/qdeclarativecirclemapitem_p.h
index e09e0ea4..a1f62b0c 100644
--- a/src/imports/location/qdeclarativecirclemapitem_p.h
+++ b/src/imports/location/qdeclarativecirclemapitem_p.h
@@ -54,14 +54,10 @@ class QDeclarativeGeoMapQuickItem;
class QGeoMapCircleGeometry : public QGeoMapPolygonGeometry
{
- Q_OBJECT
-
public:
- explicit QGeoMapCircleGeometry(QObject *parent = 0);
+ QGeoMapCircleGeometry();
void updateScreenPointsInvert(const QGeoMap &map);
-
-
};
class QDeclarativeCircleMapItem : public QDeclarativeGeoMapItemBase
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp
index 2159e70a..a4cec374 100644
--- a/src/imports/location/qdeclarativegeocodemodel.cpp
+++ b/src/imports/location/qdeclarativegeocodemodel.cpp
@@ -146,7 +146,7 @@ void QDeclarativeGeocodeModel::update()
return;
if (!plugin_) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, GEOCODE_PLUGIN_NOT_SET);
+ qmlInfo(this) << QStringLiteral("Cannot geocode, plugin not set.");
return;
}
@@ -156,12 +156,12 @@ void QDeclarativeGeocodeModel::update()
QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager();
if (!geocodingManager) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, GEOCODE_MGR_NOT_SET);
+ qmlInfo(this) << QStringLiteral("Cannot geocode, geocode manager not set.");
return;
}
if (!coordinate_.isValid() && (!address_ || address_->address().isEmpty()) &&
(searchString_.isEmpty())) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, GEOCODE_QUERY_NOT_SET);
+ qmlInfo(this) << QStringLiteral("Cannot geocode, valid query not set.");
return;
}
abortRequest(); // abort possible previous requests
@@ -288,7 +288,8 @@ void QDeclarativeGeocodeModel::pluginReady()
QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager();
if (!geocodingManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, PLUGIN_DOESNOT_SUPPORT_GEOCODING).arg(serviceProvider->errorString());
+ qmlInfo(this) << QStringLiteral("Error: Plugin does not support (reverse) geocoding.\nError message:")
+ << serviceProvider->errorString();
return;
}
connect(geocodingManager, SIGNAL(finished(QGeoCodeReply*)),
@@ -510,7 +511,7 @@ int QDeclarativeGeocodeModel::count() const
QDeclarativeGeoLocation *QDeclarativeGeocodeModel::get(int index)
{
if (index < 0 || index >= declarativeLocations_.count()) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, INDEX_OUT_OF_RANGE).arg(index);
+ qmlInfo(this) << QStringLiteral("Index '%1' out of range").arg(index);
return 0;
}
return declarativeLocations_.at(index);
@@ -662,11 +663,13 @@ void QDeclarativeGeocodeModel::setQuery(const QVariant &query)
connect(address_, SIGNAL(streetChanged()), this, SLOT(queryContentChanged()));
connect(address_, SIGNAL(postalCodeChanged()), this, SLOT(queryContentChanged()));
} else {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, UNSUPPORTED_QUERY_TYPE);
+ qmlInfo(this) << QStringLiteral("Unsupported query type for geocode model ")
+ << QStringLiteral("(coordinate, string and Address supported).");
return;
}
} else {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, UNSUPPORTED_QUERY_TYPE);
+ qmlInfo(this) << QStringLiteral("Unsupported query type for geocode model ")
+ << QStringLiteral("(coordinate, string and Address supported).");
return;
}
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index a4d86b84..9e2e4ebb 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -256,9 +256,9 @@ void QDeclarativeGeoMap::onMapChildrenChanged()
copyrightsWPtr_ = new QDeclarativeGeoMapCopyrightNotice(this);
copyrights = copyrightsWPtr_.data();
connect(map_,
- SIGNAL(copyrightsChanged(const QImage &, const QPoint &)),
+ SIGNAL(copyrightsChanged(QImage,QPoint)),
copyrights,
- SLOT(copyrightsChanged(const QImage &, const QPoint &)));
+ SLOT(copyrightsChanged(QImage,QPoint)));
} else {
// just re-set its parent.
copyrights->setParent(this);
@@ -278,8 +278,8 @@ void QDeclarativeGeoMap::pluginReady()
mappingManager_ = serviceProvider_->mappingManager();
if (!mappingManager_ || serviceProvider_->error() != QGeoServiceProvider::NoError) {
- QString msg = QCoreApplication::translate(CONTEXT_NAME, PLUGIN_DOESNOT_SUPPORT_MAPPING).arg(serviceProvider_->errorString());
- qmlInfo(this) << msg;
+ qmlInfo(this) << QStringLiteral("Error: Plugin does not support mapping.\nError message:")
+ << serviceProvider_->errorString();
return;
}
@@ -445,7 +445,7 @@ QSGNode *QDeclarativeGeoMap::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
void QDeclarativeGeoMap::setPlugin(QDeclarativeGeoServiceProvider *plugin)
{
if (plugin_) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, PLUGIN_SET_ONCE);
+ qmlInfo(this) << QStringLiteral("Plugin is a write-once property, and cannot be set again.");
return;
}
plugin_ = plugin;
@@ -483,9 +483,9 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
copyrightsWPtr_ = new QDeclarativeGeoMapCopyrightNotice(this);
connect(map_,
- SIGNAL(copyrightsChanged(const QImage &, const QPoint &)),
+ SIGNAL(copyrightsChanged(QImage,QPoint)),
copyrightsWPtr_.data(),
- SLOT(copyrightsChanged(const QImage &, const QPoint &)));
+ SLOT(copyrightsChanged(QImage,QPoint)));
connect(map_,
SIGNAL(updateRequired()),
diff --git a/src/imports/location/qdeclarativegeomapitemview.cpp b/src/imports/location/qdeclarativegeomapitemview.cpp
index ccfc4537..28a8a9b4 100644
--- a/src/imports/location/qdeclarativegeomapitemview.cpp
+++ b/src/imports/location/qdeclarativegeomapitemview.cpp
@@ -121,10 +121,10 @@ void QDeclarativeGeoMapItemView::setModel(const QVariant &model)
itemModel_ = itemModel;
QObject::connect(itemModel_, SIGNAL(modelReset()),
this, SLOT(itemModelReset()));
- QObject::connect(itemModel_, SIGNAL(rowsRemoved(QModelIndex, int, int)),
- this, SLOT(itemModelRowsRemoved(QModelIndex, int, int)));
- QObject::connect(itemModel_, SIGNAL(rowsInserted(QModelIndex, int, int)),
- this, SLOT(itemModelRowsInserted(QModelIndex, int, int)));
+ QObject::connect(itemModel_, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(itemModelRowsRemoved(QModelIndex,int,int)));
+ QObject::connect(itemModel_, SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(itemModelRowsInserted(QModelIndex,int,int)));
repopulate();
emit modelChanged();
}
diff --git a/src/imports/location/qdeclarativegeoroutemodel.cpp b/src/imports/location/qdeclarativegeoroutemodel.cpp
index 829398cf..5db8b9ec 100644
--- a/src/imports/location/qdeclarativegeoroutemodel.cpp
+++ b/src/imports/location/qdeclarativegeoroutemodel.cpp
@@ -222,7 +222,8 @@ void QDeclarativeGeoRouteModel::abortRequest()
QDeclarativeGeoRoute *QDeclarativeGeoRouteModel::get(int index)
{
if (index < 0 || index >= routes_.count()) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, INDEX_INVALID).arg(index);
+ qmlInfo(this) << QStringLiteral("Error, invalid index for get():")
+ << index;
return 0;
}
return routes_.at(index);
@@ -254,12 +255,12 @@ int QDeclarativeGeoRouteModel::rowCount(const QModelIndex &parent) const
QVariant QDeclarativeGeoRouteModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid()) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, MODEL_INDEX_INVALID);
+ qmlInfo(this) << QStringLiteral("Error in indexing route model's data (invalid index).");
return QVariant();
}
if (index.row() >= routes_.count()) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, MODEL_INDEX_OUT_OF_RANGE);
+ qmlInfo(this) << QStringLiteral("Fatal error in indexing route model's data (index overflow).");
return QVariant();
}
@@ -316,7 +317,8 @@ void QDeclarativeGeoRouteModel::pluginReady()
QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
QGeoRoutingManager *routingManager = serviceProvider->routingManager();
if (!routingManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, PLUGIN_DOESNOT_SUPPORT_ROUTING).arg(serviceProvider->errorString());
+ qmlInfo(this) << QStringLiteral("Error: Plugin does not support routing.\nError message:")
+ << serviceProvider->errorString();
return;
}
connect(routingManager, SIGNAL(finished(QGeoRouteReply*)),
@@ -427,7 +429,7 @@ bool QDeclarativeGeoRouteModel::autoUpdate() const
void QDeclarativeGeoRouteModel::setMeasurementSystem(QLocale::MeasurementSystem ms)
{
if (!plugin_) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_PLUGIN_NOT_SET);
+ qmlInfo(this) << ROUTE_PLUGIN_NOT_SET;
return;
}
@@ -437,7 +439,7 @@ void QDeclarativeGeoRouteModel::setMeasurementSystem(QLocale::MeasurementSystem
QGeoRoutingManager *routingManager = serviceProvider->routingManager();
if (!routingManager) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_MGR_NOT_SET);
+ qmlInfo(this) << ROUTE_MGR_NOT_SET;
return;
}
@@ -463,7 +465,7 @@ QLocale::MeasurementSystem QDeclarativeGeoRouteModel::measurementSystem() const
QGeoRoutingManager *routingManager = serviceProvider->routingManager();
if (!routingManager) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_MGR_NOT_SET);
+ qmlInfo(this) << ROUTE_MGR_NOT_SET;
if (plugin_->locales().isEmpty())
return QLocale().measurementSystem();
@@ -575,7 +577,7 @@ void QDeclarativeGeoRouteModel::update()
return;
if (!plugin_) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_PLUGIN_NOT_SET);
+ qmlInfo(this) << ROUTE_PLUGIN_NOT_SET;
return;
}
@@ -585,17 +587,17 @@ void QDeclarativeGeoRouteModel::update()
QGeoRoutingManager *routingManager = serviceProvider->routingManager();
if (!routingManager) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_MGR_NOT_SET);
+ qmlInfo(this) << ROUTE_MGR_NOT_SET;
return;
}
if (!routeQuery_) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_QUERY_NOT_SET);
+ qmlInfo(this) << QStringLiteral("Cannot route, valid query not set.");
return;
}
abortRequest(); // Clear previus requests
QGeoRouteRequest request = routeQuery_->routeRequest();
if (request.waypoints().count() < 2) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, ROUTE_WAYPOINTS_NOT_SET);
+ qmlInfo(this) << QStringLiteral("Not enough waypoints for routing.");
return;
}
@@ -952,7 +954,7 @@ void QDeclarativeGeoRouteQuery::removeExcludedArea(const QGeoRectangle &area)
int index = excludedAreas.lastIndexOf(area);
if (index == -1) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, CANNOT_REMOVE_AREA);
+ qmlInfo(this) << QStringLiteral("Cannot remove nonexistent area.");
return;
}
excludedAreas.removeAt(index);
@@ -992,7 +994,7 @@ void QDeclarativeGeoRouteQuery::clearExcludedAreas()
void QDeclarativeGeoRouteQuery::addWaypoint(const QGeoCoordinate &waypoint)
{
if (!waypoint.isValid()) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, CANNOT_ADD_INVALID_WAYPOINT);
+ qmlInfo(this) << QStringLiteral("Not adding invalid waypoint.");
return;
}
@@ -1021,7 +1023,7 @@ void QDeclarativeGeoRouteQuery::removeWaypoint(const QGeoCoordinate &waypoint)
int index = waypoints.lastIndexOf(waypoint);
if (index == -1) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, CANNOT_REMOVE_WAYPOINT);
+ qmlInfo(this) << QStringLiteral("Cannot remove nonexistent waypoint.");
return;
}
diff --git a/src/imports/location/qdeclarativepolygonmapitem.cpp b/src/imports/location/qdeclarativepolygonmapitem.cpp
index 55261ed1..032d619d 100644
--- a/src/imports/location/qdeclarativepolygonmapitem.cpp
+++ b/src/imports/location/qdeclarativepolygonmapitem.cpp
@@ -145,8 +145,8 @@ struct Vertex
QVector2D position;
};
-QGeoMapPolygonGeometry::QGeoMapPolygonGeometry(QObject *parent) :
- QGeoMapItemGeometry(parent), assumeSimple_(false)
+QGeoMapPolygonGeometry::QGeoMapPolygonGeometry()
+: assumeSimple_(false)
{
}
@@ -297,7 +297,7 @@ void QGeoMapPolygonGeometry::updateScreenPoints(const QGeoMap &map)
p2t::Triangle *t = tris.at(i);
for (int j = 0; j < 3; ++j) {
p2t::Point *p = t->GetPoint(j);
- screenVertices_ << Point(p->x, p->y);
+ screenVertices_ << QPointF(p->x, p->y);
}
}
delete cdt;
@@ -469,12 +469,12 @@ void QDeclarativePolygonMapItem::removeCoordinate(const QGeoCoordinate &coordina
int index = path_.lastIndexOf(coordinate);
if (index == -1) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, COORD_NOT_BELONG_TO).arg("PolygonMapItem");
+ qmlInfo(this) << COORD_NOT_BELONG_TO << QStringLiteral("PolygonMapItem");
return;
}
if (path_.count() < index + 1) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, COORD_NOT_BELONG_TO).arg("PolygonMapItem");
+ qmlInfo(this) << COORD_NOT_BELONG_TO << QStringLiteral("PolygonMapItem");
return;
}
path_.removeAt(index);
diff --git a/src/imports/location/qdeclarativepolygonmapitem_p.h b/src/imports/location/qdeclarativepolygonmapitem_p.h
index e96dd2cf..148b4cdf 100644
--- a/src/imports/location/qdeclarativepolygonmapitem_p.h
+++ b/src/imports/location/qdeclarativepolygonmapitem_p.h
@@ -56,10 +56,8 @@ class MapPolygonNode;
class QGeoMapPolygonGeometry : public QGeoMapItemGeometry
{
- Q_OBJECT
-
public:
- explicit QGeoMapPolygonGeometry(QObject *parent = 0);
+ QGeoMapPolygonGeometry();
inline void setAssumeSimple(bool value) { assumeSimple_ = value; }
diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp
index 65b61da1..aefbc435 100644
--- a/src/imports/location/qdeclarativepolylinemapitem.cpp
+++ b/src/imports/location/qdeclarativepolylinemapitem.cpp
@@ -180,8 +180,7 @@ struct Vertex
QVector2D position;
};
-QGeoMapPolylineGeometry::QGeoMapPolylineGeometry(QObject *parent) :
- QGeoMapItemGeometry(parent)
+QGeoMapPolylineGeometry::QGeoMapPolylineGeometry()
{
}
@@ -433,7 +432,7 @@ void QGeoMapPolylineGeometry::updateScreenPoints(const QGeoMap &map,
QPolygonF tri;
const float *vs = ts.vertices();
for (int i = 0; i < (ts.vertexCount()/2*2); i += 2) {
- screenVertices_ << Point(vs[i], vs[i + 1]);
+ screenVertices_ << QPointF(vs[i], vs[i + 1]);
if (!qIsFinite(vs[i]) || !qIsFinite(vs[i + 1]))
break;
@@ -574,12 +573,12 @@ void QDeclarativePolylineMapItem::removeCoordinate(const QGeoCoordinate &coordin
int index = path_.lastIndexOf(coordinate);
if (index == -1) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, COORD_NOT_BELONG_TO).arg("PolylineMapItem");
+ qmlInfo(this) << COORD_NOT_BELONG_TO << QStringLiteral("PolylineMapItem");
return;
}
if (path_.count() < index + 1) {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, COORD_NOT_BELONG_TO).arg("PolylineMapItem");
+ qmlInfo(this) << COORD_NOT_BELONG_TO << QStringLiteral("PolylineMapItem");
return;
}
path_.removeAt(index);
diff --git a/src/imports/location/qdeclarativepolylinemapitem_p.h b/src/imports/location/qdeclarativepolylinemapitem_p.h
index 18f85b09..e013e6ca 100644
--- a/src/imports/location/qdeclarativepolylinemapitem_p.h
+++ b/src/imports/location/qdeclarativepolylinemapitem_p.h
@@ -81,10 +81,8 @@ private:
class QGeoMapPolylineGeometry : public QGeoMapItemGeometry
{
- Q_OBJECT
-
public:
- explicit QGeoMapPolylineGeometry(QObject *parent = 0);
+ QGeoMapPolylineGeometry();
void updateSourcePoints(const QGeoMap &map,
const QList<QGeoCoordinate> &path);
diff --git a/src/imports/location/qdeclarativerectanglemapitem.cpp b/src/imports/location/qdeclarativerectanglemapitem.cpp
index 54514ea5..8004a542 100644
--- a/src/imports/location/qdeclarativerectanglemapitem.cpp
+++ b/src/imports/location/qdeclarativerectanglemapitem.cpp
@@ -122,8 +122,7 @@ struct Vertex
QVector2D position;
};
-QGeoMapRectangleGeometry::QGeoMapRectangleGeometry(QObject *parent) :
- QGeoMapItemGeometry(parent)
+QGeoMapRectangleGeometry::QGeoMapRectangleGeometry()
{
}
diff --git a/src/imports/location/qdeclarativerectanglemapitem_p.h b/src/imports/location/qdeclarativerectanglemapitem_p.h
index ead79f59..6adc8e31 100644
--- a/src/imports/location/qdeclarativerectanglemapitem_p.h
+++ b/src/imports/location/qdeclarativerectanglemapitem_p.h
@@ -52,10 +52,8 @@ QT_BEGIN_NAMESPACE
class QGeoMapRectangleGeometry : public QGeoMapItemGeometry
{
- Q_OBJECT
-
public:
- explicit QGeoMapRectangleGeometry(QObject *parent = 0);
+ QGeoMapRectangleGeometry();
void updatePoints(const QGeoMap &map,
const QGeoCoordinate &topLeft,
diff --git a/src/imports/location/qgeomapitemgeometry.cpp b/src/imports/location/qgeomapitemgeometry.cpp
index 528b084c..587e9ab9 100644
--- a/src/imports/location/qgeomapitemgeometry.cpp
+++ b/src/imports/location/qgeomapitemgeometry.cpp
@@ -47,12 +47,8 @@
QT_BEGIN_NAMESPACE
-QGeoMapItemGeometry::QGeoMapItemGeometry(QObject *parent) :
- QObject(parent),
- sourceDirty_(true),
- screenDirty_(true),
- clipToViewport_(true),
- preserveGeometry_(false)
+QGeoMapItemGeometry::QGeoMapItemGeometry()
+: sourceDirty_(true), screenDirty_(true), clipToViewport_(true), preserveGeometry_(false)
{
}
@@ -61,10 +57,9 @@ QGeoMapItemGeometry::QGeoMapItemGeometry(QObject *parent) :
*/
void QGeoMapItemGeometry::translate(const QPointF &offset)
{
- for (int i = 0; i < screenVertices_.size(); ++i) {
- screenVertices_[i].x += offset.x();
- screenVertices_[i].y += offset.y();
- }
+ for (int i = 0; i < screenVertices_.size(); ++i)
+ screenVertices_[i] += offset;
+
firstPointOffset_ += offset;
screenOutline_.translate(offset);
screenBounds_.translate(offset);
@@ -75,7 +70,7 @@ void QGeoMapItemGeometry::translate(const QPointF &offset)
*/
void QGeoMapItemGeometry::allocateAndFill(QSGGeometry *geom) const
{
- const QVector<QGeoMapItemGeometry::Point> &vx = screenVertices_;
+ const QVector<QPointF> &vx = screenVertices_;
const QVector<quint32> &ix = screenIndices_;
if (isIndexed()) {
@@ -95,7 +90,7 @@ void QGeoMapItemGeometry::allocateAndFill(QSGGeometry *geom) const
QSGGeometry::Point2D *pts = geom->vertexDataAsPoint2D();
for (int i = 0; i < vx.size(); ++i)
- pts[i].set(vx[i].x, vx[i].y);
+ pts[i].set(vx[i].x(), vx[i].y());
}
/*!
diff --git a/src/imports/location/qgeomapitemgeometry_p.h b/src/imports/location/qgeomapitemgeometry_p.h
index ac568580..39ad5bd5 100644
--- a/src/imports/location/qgeomapitemgeometry_p.h
+++ b/src/imports/location/qgeomapitemgeometry_p.h
@@ -43,7 +43,6 @@
#define QGEOMAPITEMGEOMETRY_H
#include <QPainterPath>
-#include <QPolygonF>
#include <QPointF>
#include <QRectF>
#include <QVector>
@@ -56,21 +55,10 @@ QT_BEGIN_NAMESPACE
class QSGGeometry;
class QGeoMap;
-class QGeoMapItemGeometry : public QObject
+class QGeoMapItemGeometry
{
- Q_OBJECT
-
public:
-
- struct Point
- {
- inline Point(qreal x, qreal y) : x(x), y(y) {}
- inline Point() : x(0), y(0) {}
- inline Point(const QPointF &pt) : x(pt.x()), y(pt.y()) {}
- qreal x, y;
- };
-
- explicit QGeoMapItemGeometry(QObject *parent = 0);
+ QGeoMapItemGeometry();
inline bool isSourceDirty() const { return sourceDirty_; }
inline bool isScreenDirty() const { return screenDirty_; }
@@ -100,10 +88,10 @@ public:
}
inline QVector2D vertex(quint32 index) const {
- return QVector2D(screenVertices_[index].x, screenVertices_[index].y);
+ return QVector2D(screenVertices_[index]);
}
- inline QVector<Point> vertices() const { return screenVertices_; }
+ inline QVector<QPointF> vertices() const { return screenVertices_; }
inline QVector<quint32> indices() const { return screenIndices_; }
inline bool isIndexed() const { return (!screenIndices_.isEmpty()); }
@@ -145,7 +133,7 @@ protected:
QGeoCoordinate srcOrigin_;
- QVector<Point> screenVertices_;
+ QVector<QPointF> screenVertices_;
QVector<quint32> screenIndices_;
};
diff --git a/src/imports/positioning/plugins.qmltypes b/src/imports/positioning/plugins.qmltypes
index 32a3c67d..bfb76203 100644
--- a/src/imports/positioning/plugins.qmltypes
+++ b/src/imports/positioning/plugins.qmltypes
@@ -11,6 +11,7 @@ Module {
name: "GeoShapeValueType"
prototype: "QQmlValueType"
exports: ["QtPositioning/GeoShape 5.0", "QtPositioning/GeoShape 5.2"]
+ isCreatable: false
exportMetaObjectRevisions: [0, 0]
Enum {
name: "ShapeType"
@@ -36,6 +37,8 @@ Module {
"QtPositioning/QtPositioning 5.0",
"QtPositioning/QtPositioning 5.2"
]
+ isCreatable: false
+ isSingleton: true
exportMetaObjectRevisions: [0, 0]
Method { name: "coordinate"; type: "QGeoCoordinate" }
Method {
@@ -122,8 +125,12 @@ Module {
Component {
name: "QDeclarativePosition"
prototype: "QObject"
- exports: ["QtPositioning/Position 5.0", "QtPositioning/Position 5.2"]
- exportMetaObjectRevisions: [0, 0]
+ exports: [
+ "QtPositioning/Position 5.0",
+ "QtPositioning/Position 5.2",
+ "QtPositioning/Position 5.3"
+ ]
+ exportMetaObjectRevisions: [0, 0, 1]
Property { name: "latitudeValid"; type: "bool"; isReadonly: true }
Property { name: "longitudeValid"; type: "bool"; isReadonly: true }
Property { name: "altitudeValid"; type: "bool"; isReadonly: true }
@@ -135,6 +142,14 @@ Module {
Property { name: "verticalAccuracy"; type: "double" }
Property { name: "horizontalAccuracyValid"; type: "bool"; isReadonly: true }
Property { name: "verticalAccuracyValid"; type: "bool"; isReadonly: true }
+ Property { name: "directionValid"; revision: 1; type: "bool"; isReadonly: true }
+ Property { name: "direction"; revision: 1; type: "double"; isReadonly: true }
+ Property { name: "verticalSpeedValid"; revision: 1; type: "bool"; isReadonly: true }
+ Property { name: "verticalSpeed"; revision: 1; type: "double"; isReadonly: true }
+ Signal { name: "directionValidChanged"; revision: 1 }
+ Signal { name: "directionChanged"; revision: 1 }
+ Signal { name: "verticalSpeedValidChanged"; revision: 1 }
+ Signal { name: "verticalSpeedChanged"; revision: 1 }
}
Component {
name: "QDeclarativePositionSource"
diff --git a/src/imports/positioning/positioning.pro b/src/imports/positioning/positioning.pro
index 6af459d8..d07dbce9 100644
--- a/src/imports/positioning/positioning.pro
+++ b/src/imports/positioning/positioning.pro
@@ -11,7 +11,6 @@ HEADERS += qdeclarativeposition_p.h \
qdeclarativegeocircle.h \
locationvaluetypeprovider.h \
locationsingleton.h \
- error_messages.h \
qdeclarativegeocoordinateanimation_p.h
SOURCES += qdeclarativeposition.cpp \
@@ -23,7 +22,6 @@ SOURCES += qdeclarativeposition.cpp \
qdeclarativegeocircle.cpp \
locationvaluetypeprovider.cpp \
locationsingleton.cpp \
- error_messages.cpp \
qdeclarativegeocoordinateanimation.cpp
load(qml_plugin)
diff --git a/src/imports/positioning/qdeclarativepositionsource.cpp b/src/imports/positioning/qdeclarativepositionsource.cpp
index fe2a3e56..cc8dfe56 100644
--- a/src/imports/positioning/qdeclarativepositionsource.cpp
+++ b/src/imports/positioning/qdeclarativepositionsource.cpp
@@ -41,7 +41,6 @@
#include "qdeclarativepositionsource_p.h"
#include "qdeclarativeposition_p.h"
-#include "error_messages.h"
#include <QtCore/QCoreApplication>
#include <QtQml/qqmlinfo.h>
@@ -290,7 +289,7 @@ void QDeclarativePositionSource::setNmeaSource(const QUrl &nmeaSource)
QTimer::singleShot(0, this, SLOT(start()));
}
} else {
- qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, MISSED_NMEA_FILE) << localFileName;
+ qmlInfo(this) << QStringLiteral("Nmea file not found") << localFileName;
#ifdef QDECLARATIVE_POSITION_DEBUG
qDebug() << "QDeclarativePositionSource NMEA File was not found: " << localFileName;
#endif
@@ -637,7 +636,7 @@ void QDeclarativePositionSource::positionUpdateReceived(const QGeoPositionInfo &
/*!
\qmlproperty enumeration PositionSource::sourceError
- This property holds the error which last occured with the PositionSource.
+ This property holds the error which last occurred with the PositionSource.
\list
\li PositionSource.AccessError - The connection setup to the remote positioning backend failed because the
diff --git a/src/location/doc/snippets/declarative/maps.qml b/src/location/doc/snippets/declarative/maps.qml
index 1a6d78fc..4143a409 100644
--- a/src/location/doc/snippets/declarative/maps.qml
+++ b/src/location/doc/snippets/declarative/maps.qml
@@ -43,7 +43,7 @@ import QtQuick 2.0
//! [QtQuick import]
import QtPositioning 5.2
//! [QtLocation import]
-import QtLocation 5.0
+import QtLocation 5.3
//! [QtLocation import]
Item {
@@ -88,7 +88,7 @@ Item {
property MapCircle circle
Component.onCompleted: {
- circle = Qt.createQmlObject('import QtLocation 5.0; MapCircle {}', page)
+ circle = Qt.createQmlObject('import QtLocation 5.3; MapCircle {}', page)
circle.center = positionSource.position.coordinate
circle.radius = 5000.0
circle.color = 'green'
diff --git a/src/location/doc/snippets/declarative/places.qml b/src/location/doc/snippets/declarative/places.qml
index 6f32ddaf..68349540 100644
--- a/src/location/doc/snippets/declarative/places.qml
+++ b/src/location/doc/snippets/declarative/places.qml
@@ -43,7 +43,7 @@ import QtQuick 2.0
//! [QtQuick import]
//! [QtLocation import]
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
//! [QtLocation import]
Item {
@@ -105,7 +105,7 @@ Item {
function writeExtendedAttributes() {
//! [ExtendedAttributes write]
//assign a new attribute to a place
- var smokingAttrib = Qt.createQmlObject('import QtLocation 5.0; PlaceAttribute {}', place);
+ var smokingAttrib = Qt.createQmlObject('import QtLocation 5.3; PlaceAttribute {}', place);
smokingAttrib.label = "Smoking Allowed"
smokingAttrib.text = "No"
place.extendedAttributes.smoking = smokingAttrib;
@@ -273,7 +273,7 @@ Item {
//! [ContactDetails write single]
function writeSingle() {
- var phoneNumber = Qt.createQmlObject('import QtLocation 5.0; ContactDetail {}', place);
+ var phoneNumber = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', place);
phoneNumber.label = "Phone";
phoneNumber.value = "555-5555"
place.contactDetails.phone = phoneNumber;
@@ -282,11 +282,11 @@ Item {
//! [ContactDetails write multiple]
function writeMultiple() {
- var bob = Qt.createQmlObject('import QtLocation 5.0; ContactDetail {}', place);
+ var bob = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', place);
bob.label = "Bob";
bob.value = "555-5555"
- var alice = Qt.createQmlObject('import QtLocation 5.0; ContactDetail {}', place);
+ var alice = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', place);
alice.label = "Alice";
alice.value = "555-8745"
@@ -362,7 +362,7 @@ Item {
function createAndSavePlace() {
//! [Place createAndSavePlace]
//creating and saving a place
- var place = Qt.createQmlObject('import QtLocation 5.0; Place { }', parent);
+ var place = Qt.createQmlObject('import QtLocation 5.3; Place { }', parent);
place.plugin = myPlugin;
place.name = "New York";
place.location.coordinate.latitude = 40.7
@@ -380,7 +380,7 @@ Item {
function saveToNewPlugin() {
//! [Place save to different plugin]
- place = Qt.createQmlObject('import QtLocation 5.0; Place { }', parent);
+ place = Qt.createQmlObject('import QtLocation 5.3; Place { }', parent);
place.plugin = destinationPlugin;
place.copyFrom(originalPlace);
place.save();
diff --git a/src/location/doc/snippets/declarative/places_loader.qml b/src/location/doc/snippets/declarative/places_loader.qml
index 13bfc74b..d14223fd 100644
--- a/src/location/doc/snippets/declarative/places_loader.qml
+++ b/src/location/doc/snippets/declarative/places_loader.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
Rectangle {
width: 360
diff --git a/src/location/doc/snippets/declarative/plugin.qml b/src/location/doc/snippets/declarative/plugin.qml
index 64b2a55a..889f9dfb 100644
--- a/src/location/doc/snippets/declarative/plugin.qml
+++ b/src/location/doc/snippets/declarative/plugin.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
//! [Plugin import]
-import QtLocation 5.0
+import QtLocation 5.3
//! [Plugin import]
Item {
diff --git a/src/location/doc/snippets/declarative/routing.qml b/src/location/doc/snippets/declarative/routing.qml
index 04258bdd..c2a40179 100644
--- a/src/location/doc/snippets/declarative/routing.qml
+++ b/src/location/doc/snippets/declarative/routing.qml
@@ -42,7 +42,7 @@
import QtQuick 2.0
//! [QtQuick import]
//! [QtLocation import]
-import QtLocation 5.0
+import QtLocation 5.3
//! [QtLocation import]
Item {
diff --git a/src/location/doc/snippets/places/requesthandler.h b/src/location/doc/snippets/places/requesthandler.h
index e18b6276..8b157ce6 100644
--- a/src/location/doc/snippets/places/requesthandler.h
+++ b/src/location/doc/snippets/places/requesthandler.h
@@ -70,7 +70,7 @@ public:
searchRequest.setSearchTerm("ice cream");
searchRequest.setSearchArea(QGeoCircle(QGeoCoordinate(12.34, 56.78)));
- //2) Use the manager to initiate a request and retreive a reply object
+ //2) Use the manager to initiate a request and retrieve a reply object
QPlaceSearchReply * searchReply = manager->search(searchRequest);
//3) Connect the reply object to a slot which is invoked upon operation completion
diff --git a/src/location/doc/src/qml-maps.qdoc b/src/location/doc/src/qml-maps.qdoc
index 460ec170..87a2662a 100644
--- a/src/location/doc/src/qml-maps.qdoc
+++ b/src/location/doc/src/qml-maps.qdoc
@@ -69,7 +69,7 @@ to center a \l{Map}{map} on the current position:
Rectangle {
import QtPositioning 5.2
- import QtLocation 5.0
+ import QtLocation 5.3
...
map : Map {
diff --git a/src/location/doc/src/qtlocation-qml.qdoc b/src/location/doc/src/qtlocation-qml.qdoc
index ed280dfb..2aea6643 100644
--- a/src/location/doc/src/qtlocation-qml.qdoc
+++ b/src/location/doc/src/qtlocation-qml.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtLocation 5.0
+ \qmlmodule QtLocation 5.3
\title Qt Location QML Types
\ingroup qmlmodules
\brief Provides QML types for mapping and location information
diff --git a/src/location/doc/src/qtlocation.qdoc b/src/location/doc/src/qtlocation.qdoc
index dc3fc14d..032f5448 100644
--- a/src/location/doc/src/qtlocation.qdoc
+++ b/src/location/doc/src/qtlocation.qdoc
@@ -40,7 +40,7 @@
To load the Qt Location module, add the following statement to your .qml files
\code
- import QtLocation 5.0
+ import QtLocation 5.3
\endcode
For C++ projects include the header appropriate for the current use case,
@@ -86,7 +86,7 @@ for navigation and awareness of objects that may aid or hinder a journey.
To load the Qt Location module, add the following statement to your .qml files
\code
- import QtLocation 5.0
+ import QtLocation 5.3
\endcode
For C++ projects include the header appropriate for the current use case,
diff --git a/src/location/maps/qgeocameracapabilities.cpp b/src/location/maps/qgeocameracapabilities.cpp
index 23b5fb31..c2ffdbeb 100644
--- a/src/location/maps/qgeocameracapabilities.cpp
+++ b/src/location/maps/qgeocameracapabilities.cpp
@@ -213,7 +213,7 @@ double QGeoCameraCapabilities::maximumZoomLevel() const
/*!
Sets whether the associated plugin can render a map when the camera
- has an aribtrary bearing to \a supportsBearing.
+ has an arbitrary bearing to \a supportsBearing.
*/
void QGeoCameraCapabilities::setSupportsBearing(bool supportsBearing)
{
@@ -223,7 +223,7 @@ void QGeoCameraCapabilities::setSupportsBearing(bool supportsBearing)
/*!
Returns whether the associated plugin can render a map when the camera
- has an aribtrary bearing.
+ has an arbitrary bearing.
*/
bool QGeoCameraCapabilities::supportsBearing() const
{
diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp
index 32bbae36..0d5a5626 100644
--- a/src/location/maps/qgeocameratiles.cpp
+++ b/src/location/maps/qgeocameratiles.cpp
@@ -85,6 +85,7 @@ public:
QString pluginString_;
QGeoMapType mapType_;
+ int mapVersion_;
QGeoCameraData camera_;
QSize screenSize_;
int tileSize_;
@@ -245,6 +246,17 @@ void QGeoCameraTiles::setMapType(const QGeoMapType &mapType)
d->updateMetadata();
}
+void QGeoCameraTiles::setMapVersion(const int mapVersion)
+{
+ Q_D(QGeoCameraTiles);
+
+ if (d->mapVersion_ == mapVersion)
+ return;
+
+ d->mapVersion_ = mapVersion;
+ d->updateMetadata();
+}
+
void QGeoCameraTiles::setTileSize(int tileSize)
{
Q_D(QGeoCameraTiles);
@@ -285,7 +297,8 @@ QGeoCameraTilesPrivate::QGeoCameraTilesPrivate()
: tileSize_(0),
maxZoom_(0),
intZoomLevel_(0),
- sideLength_(0) {}
+ sideLength_(0),
+ mapVersion_(-1) {}
QGeoCameraTilesPrivate::~QGeoCameraTilesPrivate() {}
@@ -300,7 +313,7 @@ void QGeoCameraTilesPrivate::updateMetadata()
for (; i != end; ++i) {
QGeoTileSpec tile = *i;
- newTiles.insert(QGeoTileSpec(pluginString_, mapType_.mapId(), tile.zoom(), tile.x(), tile.y()));
+ newTiles.insert(QGeoTileSpec(pluginString_, mapType_.mapId(), tile.zoom(), tile.x(), tile.y(), mapVersion_));
}
tiles_ = newTiles;
@@ -988,7 +1001,7 @@ QSet<QGeoTileSpec> QGeoCameraTilesPrivate::tilesFromPolygon(const Polygon &polyg
int minX = i->first;
int maxX = i->second;
for (int x = minX; x <= maxX; ++x) {
- results.insert(QGeoTileSpec(pluginString_, mapType_.mapId(), z, x, y));
+ results.insert(QGeoTileSpec(pluginString_, mapType_.mapId(), z, x, y, mapVersion_));
}
}
diff --git a/src/location/maps/qgeocameratiles_p.h b/src/location/maps/qgeocameratiles_p.h
index 29cae47f..efaace75 100644
--- a/src/location/maps/qgeocameratiles_p.h
+++ b/src/location/maps/qgeocameratiles_p.h
@@ -80,6 +80,7 @@ public:
void setPluginString(const QString &pluginString);
void setMapType(const QGeoMapType &mapType);
+ void setMapVersion(int mapVersion);
QSet<QGeoTileSpec> tiles() const;
void findPrefetchTiles();
diff --git a/src/location/maps/qgeocodingmanager.cpp b/src/location/maps/qgeocodingmanager.cpp
index 5dcb873e..79b0bcc6 100644
--- a/src/location/maps/qgeocodingmanager.cpp
+++ b/src/location/maps/qgeocodingmanager.cpp
@@ -96,9 +96,9 @@ QGeoCodingManager::QGeoCodingManager(QGeoCodingManagerEngine *engine, QObject *p
SIGNAL(finished(QGeoCodeReply*)));
connect(d_ptr->engine,
- SIGNAL(error(QGeoCodeReply*, QGeoCodeReply::Error, QString)),
+ SIGNAL(error(QGeoCodeReply*,QGeoCodeReply::Error,QString)),
this,
- SIGNAL(error(QGeoCodeReply*, QGeoCodeReply::Error, QString)));
+ SIGNAL(error(QGeoCodeReply*,QGeoCodeReply::Error,QString)));
} else {
qFatal("The geocoding manager engine that was set for this geocoding manager was NULL.");
}
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp
index 1f2b6e9b..f937c29b 100644
--- a/src/location/maps/qgeomap.cpp
+++ b/src/location/maps/qgeomap.cpp
@@ -79,10 +79,10 @@ QGeoMap::QGeoMap(QGeoMapData *mapData, QObject *parent)
: QObject(parent),
mapData_(mapData)
{
- connect(mapData_, SIGNAL(cameraDataChanged(const QGeoCameraData&)), this, SIGNAL(cameraDataChanged(const QGeoCameraData&)));
+ connect(mapData_, SIGNAL(cameraDataChanged(QGeoCameraData)), this, SIGNAL(cameraDataChanged(QGeoCameraData)));
connect(mapData_, SIGNAL(updateRequired()), this, SIGNAL(updateRequired()));
connect(mapData_, SIGNAL(activeMapTypeChanged()), this, SIGNAL(activeMapTypeChanged()));
- connect(mapData_, SIGNAL(copyrightsChanged(const QImage&, const QPoint&)), this, SIGNAL(copyrightsChanged(const QImage&, const QPoint&)));
+ connect(mapData_, SIGNAL(copyrightsChanged(QImage,QPoint)), this, SIGNAL(copyrightsChanged(QImage,QPoint)));
}
QGeoMap::~QGeoMap()
diff --git a/src/location/maps/qgeomapdata.cpp b/src/location/maps/qgeomapdata.cpp
index 69e11530..e6d7b68f 100644
--- a/src/location/maps/qgeomapdata.cpp
+++ b/src/location/maps/qgeomapdata.cpp
@@ -250,7 +250,7 @@ void QGeoMapDataPrivate::setCameraData(const QGeoCameraData &cameraData)
// Do not call this expensive function if the width is 0, since it will get called
// anyway when it is resized to a width > 0.
- // this is mainly an optimisation to the initalization of the geomap, which would otherwise
+ // this is mainly an optimization to the initialization of the geomap, which would otherwise
// call changeCameraData four or more times
if (width() > 0)
map_->changeCameraData(oldCameraData);
diff --git a/src/location/maps/qgeoroutingmanager.cpp b/src/location/maps/qgeoroutingmanager.cpp
index 07af687b..429136a5 100644
--- a/src/location/maps/qgeoroutingmanager.cpp
+++ b/src/location/maps/qgeoroutingmanager.cpp
@@ -174,9 +174,9 @@ QGeoRoutingManager::QGeoRoutingManager(QGeoRoutingManagerEngine *engine, QObject
SIGNAL(finished(QGeoRouteReply*)));
connect(d_ptr->engine,
- SIGNAL(error(QGeoRouteReply*, QGeoRouteReply::Error, QString)),
+ SIGNAL(error(QGeoRouteReply*,QGeoRouteReply::Error,QString)),
this,
- SIGNAL(error(QGeoRouteReply*, QGeoRouteReply::Error, QString)));
+ SIGNAL(error(QGeoRouteReply*,QGeoRouteReply::Error,QString)));
} else {
qFatal("The routing manager engine that was set for this routing manager was NULL.");
}
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp
index 2babbba6..1793b3ae 100644
--- a/src/location/maps/qgeoserviceprovider.cpp
+++ b/src/location/maps/qgeoserviceprovider.cpp
@@ -308,7 +308,7 @@ QGeoServiceProvider::PlacesFeatures QGeoServiceProvider::placesFeatures() const
* methods we need to call. Ideally it would be nice to find a way to embed
* these into the manager() template. */
template <class Engine>
-Engine *createEngine(QGeoServiceProviderPrivate *d_ptr)
+Engine *createEngine(QGeoServiceProviderPrivate *)
{
return 0;
}
diff --git a/src/location/maps/qgeotilecache.cpp b/src/location/maps/qgeotilecache.cpp
index 54a850cd..3bcb2275 100644
--- a/src/location/maps/qgeotilecache.cpp
+++ b/src/location/maps/qgeotilecache.cpp
@@ -334,6 +334,11 @@ QSharedPointer<QGeoTileTexture> QGeoTileCache::get(const QGeoTileSpec &spec)
return QSharedPointer<QGeoTileTexture>();
}
+QString QGeoTileCache::directory() const
+{
+ return directory_;
+}
+
void QGeoTileCache::insert(const QGeoTileSpec &spec,
const QByteArray &bytes,
const QString &format,
@@ -434,6 +439,13 @@ QString QGeoTileCache::tileSpecToFilename(const QGeoTileSpec &spec, const QStrin
filename += QString::number(spec.x());
filename += QLatin1String("-");
filename += QString::number(spec.y());
+
+ //Append version if real version number to ensure backwards compatibility and eviction of old tiles
+ if (spec.version() != -1) {
+ filename += QLatin1String("-");
+ filename += QString::number(spec.version());
+ }
+
filename += QLatin1String(".");
filename += format;
@@ -454,13 +466,14 @@ QGeoTileSpec QGeoTileCache::filenameToTileSpec(const QString &filename)
QString name = parts.at(0);
QStringList fields = name.split('-');
- if (fields.length() != 5)
+ int length = fields.length();
+ if (length != 5 && length != 6)
return emptySpec;
QList<int> numbers;
bool ok = false;
- for (int i = 1; i < 5; ++i) {
+ for (int i = 1; i < length; ++i) {
ok = false;
int value = fields.at(i).toInt(&ok);
if (!ok)
@@ -468,11 +481,16 @@ QGeoTileSpec QGeoTileCache::filenameToTileSpec(const QString &filename)
numbers.append(value);
}
+ //File name without version, append default
+ if (numbers.length() < 5)
+ numbers.append(-1);
+
return QGeoTileSpec(fields.at(0),
numbers.at(0),
numbers.at(1),
numbers.at(2),
- numbers.at(3));
+ numbers.at(3),
+ numbers.at(4));
}
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeotilecache_p.h b/src/location/maps/qgeotilecache_p.h
index 6fecfa8f..eee09de3 100644
--- a/src/location/maps/qgeotilecache_p.h
+++ b/src/location/maps/qgeotilecache_p.h
@@ -135,6 +135,7 @@ public:
void GLContextAvailable();
QSharedPointer<QGeoTileTexture> get(const QGeoTileSpec &spec);
+ QString directory() const;
// can be called without a specific tileCache pointer
static void evictFromDiskCache(QGeoCachedTileDisk *td);
diff --git a/src/location/maps/qgeotiledmapdata.cpp b/src/location/maps/qgeotiledmapdata.cpp
index 1655327b..204414f8 100644
--- a/src/location/maps/qgeotiledmapdata.cpp
+++ b/src/location/maps/qgeotiledmapdata.cpp
@@ -77,6 +77,12 @@ QGeoTiledMapData::QGeoTiledMapData(QGeoTiledMappingManagerEngine *engine, QObjec
{
d_ptr = new QGeoTiledMapDataPrivate(this, engine);
engine->registerMap(this);
+
+ connect(engine,
+ SIGNAL(mapVersionChanged()),
+ this,
+ SLOT(updateMapVersion()));
+ QMetaObject::invokeMethod(this, "updateMapVersion", Qt::QueuedConnection);
}
QGeoTiledMapData::~QGeoTiledMapData()
@@ -134,6 +140,17 @@ void QGeoTiledMapData::changeActiveMapType(const QGeoMapType mapType)
d->changeActiveMapType(mapType);
}
+int QGeoTiledMapData::mapVersion()
+{
+ return -1;
+}
+
+void QGeoTiledMapData::updateMapVersion()
+{
+ Q_D(QGeoTiledMapData);
+ d->changeMapVersion(mapVersion());
+}
+
void QGeoTiledMapData::evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTiles)
{
Q_UNUSED(visibleTiles);
@@ -184,9 +201,9 @@ QGeoTiledMapDataPrivate::QGeoTiledMapDataPrivate(QGeoTiledMapData *parent, QGeoT
mapScene_->setTileSize(engine->tileSize().width());
QObject::connect(mapScene_,
- SIGNAL(newTilesVisible(const QSet<QGeoTileSpec>&)),
+ SIGNAL(newTilesVisible(QSet<QGeoTileSpec>)),
map_,
- SLOT(evaluateCopyrights(const QSet<QGeoTileSpec>)));
+ SLOT(evaluateCopyrights(QSet<QGeoTileSpec>)));
}
QGeoTiledMapDataPrivate::~QGeoTiledMapDataPrivate()
@@ -267,6 +284,11 @@ void QGeoTiledMapDataPrivate::changeActiveMapType(const QGeoMapType mapType)
cameraTiles_->setMapType(mapType);
}
+void QGeoTiledMapDataPrivate::changeMapVersion(int mapVersion)
+{
+ cameraTiles_->setMapVersion(mapVersion);
+}
+
void QGeoTiledMapDataPrivate::resized(int width, int height)
{
if (cameraTiles_)
diff --git a/src/location/maps/qgeotiledmapdata_p.h b/src/location/maps/qgeotiledmapdata_p.h
index 126454e4..5a282a8c 100644
--- a/src/location/maps/qgeotiledmapdata_p.h
+++ b/src/location/maps/qgeotiledmapdata_p.h
@@ -93,6 +93,9 @@ public:
// Alternative to exposing this is to make tileFetched a slot, but then requestManager would
// need to be a QObject
QGeoTileRequestManager *getRequestManager();
+
+ virtual int mapVersion();
+
protected:
void mapResized(int width, int height);
void changeCameraData(const QGeoCameraData &oldCameraData);
@@ -101,6 +104,7 @@ protected:
protected Q_SLOTS:
virtual void evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTiles);
+ void updateMapVersion();
private:
QGeoTiledMapDataPrivate *d_ptr;
diff --git a/src/location/maps/qgeotiledmapdata_p_p.h b/src/location/maps/qgeotiledmapdata_p_p.h
index 67ad5cc1..446b2872 100644
--- a/src/location/maps/qgeotiledmapdata_p_p.h
+++ b/src/location/maps/qgeotiledmapdata_p_p.h
@@ -97,6 +97,7 @@ public:
void changeCameraData(const QGeoCameraData &oldCameraData);
void changeActiveMapType(const QGeoMapType mapType);
+ void changeMapVersion(int mapVersion);
void resized(int width, int height);
QGeoCoordinate screenPositionToCoordinate(const QDoubleVector2D &pos) const;
diff --git a/src/location/maps/qgeotiledmappingmanagerengine_p.h b/src/location/maps/qgeotiledmappingmanagerengine_p.h
index 22e8b867..c9d549ff 100644
--- a/src/location/maps/qgeotiledmappingmanagerengine_p.h
+++ b/src/location/maps/qgeotiledmappingmanagerengine_p.h
@@ -107,6 +107,7 @@ private Q_SLOTS:
Q_SIGNALS:
void tileError(const QGeoTileSpec &spec, const QString &errorString);
+ void mapVersionChanged();
protected:
void setTileFetcher(QGeoTileFetcher *fetcher);
diff --git a/src/location/maps/qgeotilespec.cpp b/src/location/maps/qgeotilespec.cpp
index 63d22ea5..575f15b2 100644
--- a/src/location/maps/qgeotilespec.cpp
+++ b/src/location/maps/qgeotilespec.cpp
@@ -49,8 +49,8 @@ QT_BEGIN_NAMESPACE
QGeoTileSpec::QGeoTileSpec()
: d(QSharedDataPointer<QGeoTileSpecPrivate>(new QGeoTileSpecPrivate())) {}
-QGeoTileSpec::QGeoTileSpec(const QString &plugin, int mapId, int zoom, int x, int y)
- : d(QSharedDataPointer<QGeoTileSpecPrivate>(new QGeoTileSpecPrivate(plugin, mapId, zoom, x, y))) {}
+QGeoTileSpec::QGeoTileSpec(const QString &plugin, int mapId, int zoom, int x, int y, int version)
+ : d(QSharedDataPointer<QGeoTileSpecPrivate>(new QGeoTileSpecPrivate(plugin, mapId, zoom, x, y, version))) {}
QGeoTileSpec::QGeoTileSpec(const QGeoTileSpec &other)
: d(other.d) {}
@@ -112,6 +112,16 @@ int QGeoTileSpec::mapId() const
return d->mapId_;
}
+void QGeoTileSpec::setVersion(int version)
+{
+ d->version_ = version;
+}
+
+int QGeoTileSpec::version() const
+{
+ return d->version_;
+}
+
bool QGeoTileSpec::operator == (const QGeoTileSpec &rhs) const
{
return (*(d.constData()) == *(rhs.d.constData()));
@@ -129,12 +139,13 @@ unsigned int qHash(const QGeoTileSpec &spec)
result += ((spec.zoom() * 19) % 31) << 10;
result += ((spec.x() * 23) % 31) << 15;
result += ((spec.y() * 29) % 31) << 20;
+ result += (spec.version() % 3) << 25;
return result;
}
QDebug operator<< (QDebug dbg, const QGeoTileSpec &spec)
{
- dbg << spec.plugin() << spec.mapId() << spec.zoom() << spec.x() << spec.y();
+ dbg << spec.plugin() << spec.mapId() << spec.zoom() << spec.x() << spec.y() << spec.version();
return dbg;
}
@@ -142,7 +153,8 @@ QGeoTileSpecPrivate::QGeoTileSpecPrivate()
: mapId_(0),
zoom_(-1),
x_(-1),
- y_(-1) {}
+ y_(-1),
+ version_(-1) {}
QGeoTileSpecPrivate::QGeoTileSpecPrivate(const QGeoTileSpecPrivate &other)
: QSharedData(other),
@@ -150,14 +162,16 @@ QGeoTileSpecPrivate::QGeoTileSpecPrivate(const QGeoTileSpecPrivate &other)
mapId_(other.mapId_),
zoom_(other.zoom_),
x_(other.x_),
- y_(other.y_) {}
+ y_(other.y_),
+ version_(other.version_) {}
-QGeoTileSpecPrivate::QGeoTileSpecPrivate(const QString &plugin, int mapId, int zoom, int x, int y)
+QGeoTileSpecPrivate::QGeoTileSpecPrivate(const QString &plugin, int mapId, int zoom, int x, int y, int version)
: plugin_(plugin),
mapId_(mapId),
zoom_(zoom),
x_(x),
- y_(y) {}
+ y_(y),
+ version_(version) {}
QGeoTileSpecPrivate::~QGeoTileSpecPrivate() {}
@@ -171,6 +185,7 @@ QGeoTileSpecPrivate &QGeoTileSpecPrivate::operator = (const QGeoTileSpecPrivate
zoom_ = other.zoom_;
x_ = other.x_;
y_ = other.y_;
+ version_ = other.version_;
return *this;
}
@@ -192,6 +207,9 @@ bool QGeoTileSpecPrivate::operator == (const QGeoTileSpecPrivate &rhs) const
if (y_ != rhs.y_)
return false;
+ if (version_ != rhs.version_)
+ return false;
+
return true;
}
@@ -217,7 +235,12 @@ bool QGeoTileSpecPrivate::operator < (const QGeoTileSpecPrivate &rhs) const
if (x_ > rhs.x_)
return false;
- return (y_ < rhs.y_);
+ if (y_ < rhs.y_)
+ return true;
+ if (y_ > rhs.y_)
+ return false;
+
+ return (version_ < rhs.version_);
}
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeotilespec_p.h b/src/location/maps/qgeotilespec_p.h
index ae2db7b6..e918b64b 100644
--- a/src/location/maps/qgeotilespec_p.h
+++ b/src/location/maps/qgeotilespec_p.h
@@ -68,7 +68,7 @@ class Q_LOCATION_EXPORT QGeoTileSpec
public:
QGeoTileSpec();
QGeoTileSpec(const QGeoTileSpec &other);
- QGeoTileSpec(const QString &plugin, int mapId, int zoom, int x, int y);
+ QGeoTileSpec(const QString &plugin, int mapId, int zoom, int x, int y, int version = -1);
~QGeoTileSpec();
QGeoTileSpec &operator = (const QGeoTileSpec &other);
@@ -87,6 +87,9 @@ public:
void setMapId(int mapId);
int mapId() const;
+ void setVersion(int version);
+ int version() const;
+
bool operator == (const QGeoTileSpec &rhs) const;
bool operator < (const QGeoTileSpec &rhs) const;
diff --git a/src/location/maps/qgeotilespec_p_p.h b/src/location/maps/qgeotilespec_p_p.h
index 80eaf8cb..ad50c13e 100644
--- a/src/location/maps/qgeotilespec_p_p.h
+++ b/src/location/maps/qgeotilespec_p_p.h
@@ -62,7 +62,7 @@ class QGeoTileSpecPrivate : public QSharedData
public:
QGeoTileSpecPrivate();
QGeoTileSpecPrivate(const QGeoTileSpecPrivate &other);
- QGeoTileSpecPrivate(const QString &plugin, int mapId, int zoom, int x, int y);
+ QGeoTileSpecPrivate(const QString &plugin, int mapId, int zoom, int x, int y, int version);
~QGeoTileSpecPrivate();
QGeoTileSpecPrivate &operator = (const QGeoTileSpecPrivate &other);
@@ -75,6 +75,7 @@ public:
int zoom_;
int x_;
int y_;
+ int version_;
};
QT_END_NAMESPACE
diff --git a/src/location/places/qplaceicon.cpp b/src/location/places/qplaceicon.cpp
index 1ae9c14f..fa31c504 100644
--- a/src/location/places/qplaceicon.cpp
+++ b/src/location/places/qplaceicon.cpp
@@ -111,7 +111,7 @@ bool QPlaceIconPrivate::operator == (const QPlaceIconPrivate &other) const
\variable QPlaceIcon::SingleUrl
\brief Parameter key for an icon that only has a single image URL.
- The paramter value to be used with this key is a QUrl. An icon with this parameter set will
+ The parameter value to be used with this key is a QUrl. An icon with this parameter set will
always return the specified URL regardless of the requested size when url() is called.
*/
const QString QPlaceIcon::SingleUrl(QLatin1String("singleUrl"));
diff --git a/src/location/places/qplacematchrequest.cpp b/src/location/places/qplacematchrequest.cpp
index e7917d97..bb57e3c3 100644
--- a/src/location/places/qplacematchrequest.cpp
+++ b/src/location/places/qplacematchrequest.cpp
@@ -225,7 +225,7 @@ void QPlaceMatchRequest::setResults(const QList<QPlaceSearchResult> &results)
}
/*!
- Returns the paramaters for matching places.
+ Returns the parameters for matching places.
*/
QVariantMap QPlaceMatchRequest::parameters() const
{
diff --git a/src/location/places/qplaceresult.cpp b/src/location/places/qplaceresult.cpp
index 8a3a99fe..047a7c4e 100644
--- a/src/location/places/qplaceresult.cpp
+++ b/src/location/places/qplaceresult.cpp
@@ -88,7 +88,7 @@ bool QPlaceResultPrivate::compare(const QPlaceSearchResultPrivate *other) const
\snippet places/requesthandler.h Convert search result
- The implmentation is handled in such a way that object slicing is not an issue.
+ The implementation is handled in such a way that object slicing is not an issue.
\sa QPlaceSearchResult
*/
diff --git a/src/plugins/geoservices/nokia/nokia.pro b/src/plugins/geoservices/nokia/nokia.pro
index 597f8bae..647a0a4e 100644
--- a/src/plugins/geoservices/nokia/nokia.pro
+++ b/src/plugins/geoservices/nokia/nokia.pro
@@ -27,7 +27,8 @@ HEADERS += \
qgeointrinsicnetworkaccessmanager.h \
qgeouriprovider.h \
uri_constants.h \
- qgeoerror_messages.h
+ qgeoerror_messages.h \
+ qgeomapversion.h
SOURCES += \
@@ -45,7 +46,8 @@ SOURCES += \
qgeointrinsicnetworkaccessmanager.cpp \
qgeouriprovider.cpp \
uri_constants.cpp \
- qgeoerror_messages.cpp
+ qgeoerror_messages.cpp \
+ qgeomapversion.cpp
include(placesv2/placesv2.pri)
diff --git a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp
index cbdf98f2..ff0360e4 100644
--- a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp
@@ -239,9 +239,9 @@ QGeoCodeReply *QGeoCodingManagerEngineNokia::geocode(QString requestString,
SLOT(placesFinished()));
connect(reply,
- SIGNAL(error(QGeoCodeReply::Error, QString)),
+ SIGNAL(error(QGeoCodeReply::Error,QString)),
this,
- SLOT(placesError(QGeoCodeReply::Error, QString)));
+ SLOT(placesError(QGeoCodeReply::Error,QString)));
return reply;
}
@@ -280,7 +280,7 @@ void QGeoCodingManagerEngineNokia::placesError(QGeoCodeReply::Error error, const
if (!reply)
return;
- if (receivers(SIGNAL(error(QGeoCodeReply *, QGeoCodeReply::Error, QString))) == 0) {
+ if (receivers(SIGNAL(error(QGeoCodeReply*,QGeoCodeReply::Error,QString))) == 0) {
reply->deleteLater();
return;
}
diff --git a/src/imports/positioning/error_messages.cpp b/src/plugins/geoservices/nokia/qgeomapversion.cpp
index 45b85e0a..c86b98a3 100644
--- a/src/imports/positioning/error_messages.cpp
+++ b/src/plugins/geoservices/nokia/qgeomapversion.cpp
@@ -1,9 +1,9 @@
-/***************************************************************************
+/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Appello Systems AB.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtPositioning module of the Qt Toolkit.
+** This file is part of the QtLocation module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -37,12 +37,55 @@
**
** $QT_END_LICENSE$
**
+** This file is part of the Nokia services plugin for the Maps and
+** Navigation API. The use of these services, whether by use of the
+** plugin or by other means, is governed by the terms and conditions
+** described by the file NOKIA_TERMS_AND_CONDITIONS.txt in
+** this package, located in the directory containing the Nokia services
+** plugin source code.
+**
****************************************************************************/
-#include "error_messages.h"
+
+#include "qgeomapversion.h"
+
+#include <QJsonDocument>
QT_BEGIN_NAMESPACE
-const char CONTEXT_NAME[] = "QtPositioningQML";
-const char MISSED_NMEA_FILE[] = QT_TRANSLATE_NOOP("QtPositioningQML", "Nmea file not found.");
+QGeoMapVersion::QGeoMapVersion()
+ : m_version(-1) {}
+
+bool QGeoMapVersion::isNewVersion(const QJsonObject &newVersionData)
+{
+ return m_versionData != newVersionData;
+}
+
+int QGeoMapVersion::version() const
+{
+ return m_version;
+}
+
+void QGeoMapVersion::setVersion(int version)
+{
+ m_version = version;
+}
+
+void QGeoMapVersion::setVersionData(const QJsonObject &versionData)
+{
+ m_versionData = versionData;
+}
+
+
+QByteArray QGeoMapVersion::toJson() const
+{
+
+ QJsonObject object;
+ object[QLatin1String("version")] = m_version;
+ object[QLatin1String("data")] = m_versionData;
+
+ QJsonDocument document(object);
+
+ return document.toJson();
+}
QT_END_NAMESPACE
diff --git a/src/imports/positioning/error_messages.h b/src/plugins/geoservices/nokia/qgeomapversion.h
index 3c888dff..18a9f3a7 100644
--- a/src/imports/positioning/error_messages.h
+++ b/src/plugins/geoservices/nokia/qgeomapversion.h
@@ -1,10 +1,9 @@
-
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Appello Systems AB.
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtPositioning module of the Qt Toolkit.
+** This file is part of the QtLocation module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -38,17 +37,39 @@
**
** $QT_END_LICENSE$
**
+** This file is part of the Nokia services plugin for the Maps and
+** Navigation API. The use of these services, whether by use of the
+** plugin or by other means, is governed by the terms and conditions
+** described by the file NOKIA_TERMS_AND_CONDITIONS.txt in
+** this package, located in the directory containing the Nokia services
+** plugin source code.
+**
****************************************************************************/
-#ifndef ERROR_MESSAGES_H
-#define ERROR_MESSAGES_H
-#include <QString>
+#ifndef QGEOMAPVERSION_H
+#define QGEOMAPVERSION_H
+
+#include <QByteArray>
+#include <QJsonObject>
QT_BEGIN_NAMESPACE
-extern const char CONTEXT_NAME[];
-extern const char MISSED_NMEA_FILE[];
+class QGeoMapVersion
+{
+
+public:
+ QGeoMapVersion();
+ bool isNewVersion(const QJsonObject &newVersionData);
+ int version() const;
+ void setVersion(const int);
+ void setVersionData(const QJsonObject &versionData);
+ QByteArray toJson() const;
+
+private:
+ int m_version;
+ QJsonObject m_versionData;
+};
QT_END_NAMESPACE
-#endif // ERROR_MESSAGES_H
+#endif // QGEOMAPVERSION_H
diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
index 4380494a..d0fb5b93 100644
--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
@@ -141,9 +141,9 @@ QGeoRouteReply *QGeoRoutingManagerEngineNokia::calculateRoute(const QGeoRouteReq
SLOT(routeFinished()));
connect(reply,
- SIGNAL(error(QGeoRouteReply::Error, QString)),
+ SIGNAL(error(QGeoRouteReply::Error,QString)),
this,
- SLOT(routeError(QGeoRouteReply::Error, QString)));
+ SLOT(routeError(QGeoRouteReply::Error,QString)));
return reply;
}
@@ -172,9 +172,9 @@ QGeoRouteReply *QGeoRoutingManagerEngineNokia::updateRoute(const QGeoRoute &rout
SLOT(routeFinished()));
connect(reply,
- SIGNAL(error(QGeoRouteReply::Error, QString)),
+ SIGNAL(error(QGeoRouteReply::Error,QString)),
this,
- SLOT(routeError(QGeoRouteReply::Error, QString)));
+ SLOT(routeError(QGeoRouteReply::Error,QString)));
return reply;
}
@@ -495,7 +495,7 @@ void QGeoRoutingManagerEngineNokia::routeError(QGeoRouteReply::Error error, cons
if (!reply)
return;
- if (receivers(SIGNAL(error(QGeoRouteReply*, QGeoRouteReply::Error, QString))) == 0) {
+ if (receivers(SIGNAL(error(QGeoRouteReply*,QGeoRouteReply::Error,QString))) == 0) {
reply->deleteLater();
return;
}
diff --git a/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.cpp
index 506b3f70..563d8270 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.cpp
@@ -155,4 +155,10 @@ void QGeoTiledMapDataNokia::evaluateCopyrights(const QSet<QGeoTileSpec> &visible
}
}
+int QGeoTiledMapDataNokia::mapVersion()
+{
+ QGeoTiledMappingManagerEngineNokia *engineNokia = static_cast<QGeoTiledMappingManagerEngineNokia *>(engine());
+ return engineNokia->mapVersion();
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.h b/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.h
index 24e6b9c7..af87540d 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeotiledmapdata_nokia.h
@@ -66,6 +66,8 @@ public:
QString getViewCopyright();
void evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTiles);
+ int mapVersion();
+
private:
Q_DISABLE_COPY(QGeoTiledMapDataNokia)
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
index e7f1fec7..8c3cbe3b 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
@@ -80,7 +80,7 @@ QGeoTiledMappingManagerEngineNokia::QGeoTiledMappingManagerEngineNokia(
setCameraCapabilities(capabilities);
- setTileSize(QSize(256, 256));
+ setTileSize(QSize(512, 512));
QList<QGeoMapType> types;
types << QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Normal map view in daylight mode"), false, 1);
@@ -88,12 +88,12 @@ QGeoTiledMappingManagerEngineNokia::QGeoTiledMappingManagerEngineNokia(
types << QGeoMapType(QGeoMapType::TerrainMap, tr("Terrain Map"), tr("Terrain map view in daylight mode"), false, 3);
types << QGeoMapType(QGeoMapType::HybridMap, tr("Hybrid Map"), tr("Satellite map view with streets in daylight mode"), false, 4);
types << QGeoMapType(QGeoMapType::TransitMap, tr("Transit Map"), tr("Color-reduced map view with public transport scheme in daylight mode"), false, 5);
- types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Gray Street Map"), tr("Color-reduced map view in daylight mode (especially used for background maps)"), false, 6);
+ types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Gray Street Map"), tr("Color-reduced map view in daylight mode"), false, 6);
types << QGeoMapType(QGeoMapType::StreetMap, tr("Mobile Street Map"), tr("Mobile normal map view in daylight mode"), true, 7);
types << QGeoMapType(QGeoMapType::TerrainMap, tr("Mobile Terrain Map"), tr("Mobile terrain map view in daylight mode"), true, 8);
types << QGeoMapType(QGeoMapType::HybridMap, tr("Mobile Hybrid Map"), tr("Mobile satellite map view with streets in daylight mode"), true, 9);
types << QGeoMapType(QGeoMapType::TransitMap, tr("Mobile Transit Map"), tr("Mobile color-reduced map view with public transport scheme in daylight mode"), true, 10);
- types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Mobile Gray Street Map"), tr("Mobile color-reduced map view in daylight mode (especially used for background maps)"), true, 11);
+ types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Mobile Gray Street Map"), tr("Mobile color-reduced map view in daylight mode"), true, 11);
types << QGeoMapType(QGeoMapType::StreetMap, tr("Custom Street Map"), tr("Normal map view in daylight mode"), false, 12);
types << QGeoMapType(QGeoMapType::StreetMap, tr("Night Street Map"), tr("Normal map view in night mode"), false, 13);
types << QGeoMapType(QGeoMapType::StreetMap, tr("Mobile Night Street Map"), tr("Mobile normal map view in night mode"), true, 14);
@@ -138,7 +138,9 @@ QGeoTiledMappingManagerEngineNokia::QGeoTiledMappingManagerEngineNokia(
}
populateMapSchemes();
+ loadMapVersion();
QMetaObject::invokeMethod(fetcher, "fetchCopyrightsData", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(fetcher, "fetchVersionData", Qt::QueuedConnection);
}
QGeoTiledMappingManagerEngineNokia::~QGeoTiledMappingManagerEngineNokia()
@@ -181,6 +183,11 @@ QString QGeoTiledMappingManagerEngineNokia::getBaseScheme(int mapId)
return fullScheme.section(QLatin1Char('.'), 0, 0);
}
+int QGeoTiledMappingManagerEngineNokia::mapVersion()
+{
+ return m_mapVersion.version();
+}
+
void QGeoTiledMappingManagerEngineNokia::loadCopyrightsDescriptorsFromJson(const QByteArray &jsonData)
{
QJsonDocument doc = QJsonDocument::fromJson(QByteArray(jsonData));
@@ -225,6 +232,75 @@ void QGeoTiledMappingManagerEngineNokia::loadCopyrightsDescriptorsFromJson(const
}
}
+void QGeoTiledMappingManagerEngineNokia::parseNewVersionInfo(const QByteArray &versionData)
+{
+ const QString versionString = QString::fromUtf8(versionData);
+
+ const QStringList versionLines = versionString.split(QLatin1Char('\n'));
+ QJsonObject newVersionData;
+ foreach (const QString &line, versionLines) {
+ const QStringList versionInfo = line.split(':');
+ if (versionInfo.size() > 1) {
+ const QString versionKey = versionInfo[0].trimmed();
+ const QString versionValue = versionInfo[1].trimmed();
+ if (!versionKey.isEmpty() && !versionValue.isEmpty()) {
+ newVersionData[versionKey] = versionValue;
+ }
+ }
+ }
+
+ updateVersion(newVersionData);
+}
+
+void QGeoTiledMappingManagerEngineNokia::updateVersion(const QJsonObject &newVersionData) {
+
+ if (m_mapVersion.isNewVersion(newVersionData)) {
+
+ m_mapVersion.setVersionData(newVersionData);
+ m_mapVersion.setVersion(m_mapVersion.version() + 1);
+
+ saveMapVersion();
+
+ emit mapVersionChanged();
+ }
+}
+
+void QGeoTiledMappingManagerEngineNokia::saveMapVersion()
+{
+ QDir saveDir(tileCache()->directory());
+ QFile saveFile(saveDir.filePath(QLatin1String("nokia_version")));
+
+ if (!saveFile.open(QIODevice::WriteOnly)) {
+ qWarning("Failed to write nokia map version.");
+ return;
+ }
+
+ saveFile.write(m_mapVersion.toJson());
+ saveFile.close();
+}
+
+void QGeoTiledMappingManagerEngineNokia::loadMapVersion()
+{
+
+ QDir saveDir(tileCache()->directory());
+ QFile loadFile(saveDir.filePath(QLatin1String("nokia_version")));
+
+ if (!loadFile.open(QIODevice::ReadOnly)) {
+ qWarning("Failed to read nokia map version.");
+ return;
+ }
+
+ QByteArray saveData = loadFile.readAll();
+ loadFile.close();
+
+ QJsonDocument doc(QJsonDocument::fromJson(saveData));
+
+ QJsonObject object = doc.object();
+
+ m_mapVersion.setVersion(object[QLatin1String("version")].toInt());
+ m_mapVersion.setVersionData(object[QLatin1String("data")].toObject());
+}
+
QString QGeoTiledMappingManagerEngineNokia::evaluateCopyrightsText(const QGeoMapType mapType,
const qreal zoomLevel,
const QSet<QGeoTileSpec> &tiles)
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h
index a30dcf69..0f2f5cb1 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h
@@ -52,6 +52,7 @@
#include "qgeotiledmappingmanagerengine_p.h"
#include <QtPositioning/QGeoRectangle>
#include "qgeomaptype_p.h"
+#include "qgeomapversion.h"
#include <QGeoServiceProvider>
@@ -82,9 +83,11 @@ public:
const QSet<QGeoTileSpec> &tiles);
QString getScheme(int mapId);
QString getBaseScheme(int mapId);
+ int mapVersion();
public Q_SLOTS:
void loadCopyrightsDescriptorsFromJson(const QByteArray &jsonData);
+ void parseNewVersionInfo(const QByteArray &versionData);
private:
class CopyrightDesc
@@ -103,9 +106,13 @@ private:
void initialize();
void populateMapSchemes();
+ void updateVersion(const QJsonObject &newVersionData);
+ void saveMapVersion();
+ void loadMapVersion();
QHash<QString, QList<CopyrightDesc> > m_copyrights;
QHash<int, QString> m_mapSchemes;
+ QGeoMapVersion m_mapVersion;
};
QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp
index ddd55ec4..72ec3307 100644
--- a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp
@@ -64,21 +64,18 @@
#include <map>
-#define LARGE_TILE_DIMENSION 256
-
QT_BEGIN_NAMESPACE
namespace
{
QString sizeToStr(const QSize &size)
{
- static const QString s256("256");
- static const QString s128("128");
- if (size.height() >= LARGE_TILE_DIMENSION ||
- size.width() >= LARGE_TILE_DIMENSION)
- return s256;
+ if (size.height() >= 512 || size.width() >= 512)
+ return QStringLiteral("512");
+ else if (size.height() >= 256 || size.width() >= 256)
+ return QStringLiteral("256");
else
- return s128;
+ return QStringLiteral("128"); // 128 pixel tiles are deprecated.
}
bool isAerialType(const QString mapScheme)
@@ -180,7 +177,7 @@ QString QGeoTileFetcherNokia::getLanguageString() const
// here even though the entire list is updated automagically from the server.
// The current languages are Arabic, Chinese, Simplified Chinese, English
// French, German, Italian, Polish, Russian and Spanish. The default is English.
- // These are acually available from the same host under the URL: /maptiler/v2/info
+ // These are actually available from the same host under the URL: /maptiler/v2/info
switch (locale.language()) {
case QLocale::Arabic:
@@ -249,28 +246,42 @@ QString QGeoTileFetcherNokia::applicationId() const
void QGeoTileFetcherNokia::copyrightsFetched()
{
- if (m_engineNokia) {
+ if (m_engineNokia && m_copyrightsReply->error() == QNetworkReply::NoError) {
QMetaObject::invokeMethod(m_engineNokia.data(),
"loadCopyrightsDescriptorsFromJson",
Qt::QueuedConnection,
Q_ARG(QByteArray, m_copyrightsReply->readAll()));
}
+
+ m_copyrightsReply->deleteLater();
+}
+
+void QGeoTileFetcherNokia::versionFetched()
+{
+ if (m_engineNokia && m_versionReply->error() == QNetworkReply::NoError) {
+ QMetaObject::invokeMethod(m_engineNokia.data(),
+ "parseNewVersionInfo",
+ Qt::QueuedConnection,
+ Q_ARG(QByteArray, m_versionReply->readAll()));
+ }
+
+ m_versionReply->deleteLater();
}
void QGeoTileFetcherNokia::fetchCopyrightsData()
{
- QString copyrightUrl = "http://";
+ QString copyrightUrl = QStringLiteral("http://");
copyrightUrl += m_baseUriProvider->getCurrentHost();
- copyrightUrl += "/maptile/2.1/copyright/newest?output=json";
+ copyrightUrl += QStringLiteral("/maptile/2.1/copyright/newest?output=json");
if (!token().isEmpty()) {
- copyrightUrl += "&token=";
+ copyrightUrl += QStringLiteral("&token=");
copyrightUrl += token();
}
if (!applicationId().isEmpty()) {
- copyrightUrl += "&app_id=";
+ copyrightUrl += QStringLiteral("&app_id=");
copyrightUrl += applicationId();
}
@@ -289,4 +300,36 @@ void QGeoTileFetcherNokia::fetchCopyrightsData()
}
}
+void QGeoTileFetcherNokia::fetchVersionData()
+{
+ QString versionUrl = QStringLiteral("http://");
+
+ versionUrl += m_baseUriProvider->getCurrentHost();
+ versionUrl += QStringLiteral("/maptile/2.1/version");
+
+ if (!token().isEmpty()) {
+ versionUrl += QStringLiteral("?token=");
+ versionUrl += token();
+ }
+
+ if (!applicationId().isEmpty()) {
+ versionUrl += QStringLiteral("&app_id=");
+ versionUrl += applicationId();
+ }
+
+ QNetworkRequest netRequest((QUrl(versionUrl)));
+ m_versionReply = m_networkManager->get(netRequest);
+
+ if (m_versionReply->error() != QNetworkReply::NoError) {
+ qWarning() << __FUNCTION__ << m_versionReply->errorString();
+ m_versionReply->deleteLater();
+ return;
+ }
+
+ if (m_versionReply->isFinished())
+ versionFetched();
+ else
+ connect(m_versionReply, SIGNAL(finished()), this, SLOT(versionFetched()));
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h
index a5e1801a..8d5fea45 100644
--- a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h
@@ -80,6 +80,8 @@ public:
public Q_SLOTS:
void copyrightsFetched();
void fetchCopyrightsData();
+ void versionFetched();
+ void fetchVersionData();
private:
Q_DISABLE_COPY(QGeoTileFetcherNokia)
@@ -93,6 +95,7 @@ private:
QSize m_tileSize;
QString m_token;
QNetworkReply *m_copyrightsReply;
+ QNetworkReply *m_versionReply;
QString m_applicationId;
QGeoUriProvider *m_baseUriProvider;
diff --git a/src/plugins/geoservices/nokia/qgeouriprovider.cpp b/src/plugins/geoservices/nokia/qgeouriprovider.cpp
index 77c47b03..c55b67bb 100644
--- a/src/plugins/geoservices/nokia/qgeouriprovider.cpp
+++ b/src/plugins/geoservices/nokia/qgeouriprovider.cpp
@@ -82,7 +82,7 @@ QGeoUriProvider::QGeoUriProvider(
, m_maxSubdomains(0)
{
#ifdef USE_CHINA_NETWORK_REGISTRATION
- QObject::connect(m_networkInfo, SIGNAL(currentMobileCountryCodeChanged(int, const QString&)), this, SLOT(mobileCountryCodeChanged(int, const QString &)));
+ QObject::connect(m_networkInfo, SIGNAL(currentMobileCountryCodeChanged(int,QString)), this, SLOT(mobileCountryCodeChanged(int,QString)));
#endif
setCurrentHost(isInternationalNetwork() || m_localizedHost.isEmpty() ? m_internationalHost : m_localizedHost);
}
diff --git a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp
index 077c55ba..8ed827a7 100644
--- a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp
@@ -87,7 +87,7 @@ QGeoRouteReply* QGeoRoutingManagerEngineOsm::calculateRoute(const QGeoRouteReque
QGeoRouteReplyOsm *routeReply = new QGeoRouteReplyOsm(reply, request, this);
connect(routeReply, SIGNAL(finished()), this, SLOT(replyFinished()));
- connect(routeReply, SIGNAL(error(QGeoRouteReply::Error, QString)),
+ connect(routeReply, SIGNAL(error(QGeoRouteReply::Error,QString)),
this, SLOT(replyError(QGeoRouteReply::Error,QString)));
return routeReply;
diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
index a141c239..f419fec1 100644
--- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
@@ -59,8 +59,8 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian
setTileSize(QSize(256, 256));
QList<QGeoMapType> mapTypes;
- mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Open street map street map"), false, 1);
- mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("Open street map satellite map"), false, 2);
+ mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("OpenStreetMap street map"), false, 1);
+ mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("OpenStreetMap satellite map"), false, 2);
setSupportedMapTypes(mapTypes);
QGeoTileFetcherOsm *tileFetcher = new QGeoTileFetcherOsm(this);
diff --git a/src/plugins/position/corelocation/corelocation.pro b/src/plugins/position/corelocation/corelocation.pro
index bc65ee5d..1a1a2a39 100644
--- a/src/plugins/position/corelocation/corelocation.pro
+++ b/src/plugins/position/corelocation/corelocation.pro
@@ -1,5 +1,5 @@
TARGET = qtposition_cl
-QT += positioning gui
+QT = core positioning
PLUGIN_TYPE = position
PLUGIN_CLASS_NAME = QGeoPositionInfoSourceFactoryCL
diff --git a/src/plugins/position/geoclue/qgeocluemaster.cpp b/src/plugins/position/geoclue/qgeocluemaster.cpp
index a14ad896..a6c1cbef 100644
--- a/src/plugins/position/geoclue/qgeocluemaster.cpp
+++ b/src/plugins/position/geoclue/qgeocluemaster.cpp
@@ -50,7 +50,7 @@ namespace
{
void position_provider_changed(GeoclueMasterClient *client, char *name, char *description,
- char *service, char *path, gpointer userdata)
+ char *service, char *path, QObject *handler)
{
Q_UNUSED(client)
Q_UNUSED(name)
@@ -59,9 +59,7 @@ void position_provider_changed(GeoclueMasterClient *client, char *name, char *de
const QByteArray pService = QByteArray(service);
const QByteArray pPath = QByteArray(path);
- QObject *o = static_cast<QObject *>(userdata);
-
- QMetaObject::invokeMethod(o, "positionProviderChanged", Qt::QueuedConnection,
+ QMetaObject::invokeMethod(handler, "positionProviderChanged", Qt::QueuedConnection,
Q_ARG(QByteArray, pService), Q_ARG(QByteArray, pPath));
}
diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
index 259dde6d..0b4c1414 100644
--- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
+++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
@@ -47,6 +47,7 @@
#include <QtCore/QFile>
#include <QtCore/QSaveFile>
#include <QtCore/QStandardPaths>
+#include <QtCore/QVariantMap>
#include <QtCore/QtNumeric>
#ifdef Q_LOCATION_GEOCLUE_DEBUG
@@ -60,72 +61,59 @@ QT_BEGIN_NAMESPACE
#define MINIMUM_UPDATE_INTERVAL 1000
#define UPDATE_TIMEOUT_COLD_START 120000
-// Callback for position-changed -signal
-static void position_changed (GeocluePosition *position,
- GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy *accuracy,
- gpointer userdata) // Ptr to this
+namespace
{
- Q_UNUSED(position);
- if (!(fields & GEOCLUE_POSITION_FIELDS_LATITUDE &&
- fields & GEOCLUE_POSITION_FIELDS_LONGITUDE)) {
- static_cast<QGeoPositionInfoSourceGeoclueMaster *>(userdata)->regularUpdateFailed();
- } else {
- static_cast<QGeoPositionInfoSourceGeoclueMaster *>(userdata)->regularUpdateSucceeded(
- fields, timestamp, latitude, longitude, altitude, accuracy);
- }
+
+void position_changed(GeocluePosition *position, GeocluePositionFields fields, int timestamp,
+ double latitude, double longitude, double altitude,
+ GeoclueAccuracy *accuracy, QGeoPositionInfoSourceGeoclueMaster *master)
+{
+ Q_UNUSED(position)
+
+ if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE)
+ master->updatePosition(fields, timestamp, latitude, longitude, altitude, accuracy);
+ else
+ master->regularUpdateFailed();
}
-// Callback for velocity-changed -signal
-static void velocity_changed (GeoclueVelocity *velocity,
- GeoclueVelocityFields fields,
- int timestamp,
- double speed,
- double direction,
- double climb,
- gpointer userdata) // Ptr to this
+void velocity_changed(GeoclueVelocity *velocity, GeoclueVelocityFields fields, int timestamp,
+ double speed, double direction, double climb,
+ QGeoPositionInfoSourceGeoclueMaster *master)
{
Q_UNUSED(velocity)
- QGeoPositionInfoSourceGeoclueMaster *master =
- static_cast<QGeoPositionInfoSourceGeoclueMaster *>(userdata);
-
- if (fields == GEOCLUE_VELOCITY_FIELDS_NONE) {
+ if (fields == GEOCLUE_VELOCITY_FIELDS_NONE)
master->velocityUpdateFailed();
- return;
- }
- master->velocityUpdateSucceeded(fields, timestamp, speed, direction, climb);
+ else
+ master->velocityUpdateSucceeded(fields, timestamp, speed, direction, climb);
}
-// Callback for single async update
-static void position_callback (GeocluePosition *pos, GeocluePositionFields fields, int timestamp,
- double latitude, double longitude, double altitude,
- GeoclueAccuracy *accuracy, GError *error, gpointer userdata)
+void position_callback(GeocluePosition *pos, GeocluePositionFields fields, int timestamp,
+ double latitude, double longitude, double altitude,
+ GeoclueAccuracy *accuracy, GError *error, gpointer userdata)
{
- Q_UNUSED(pos);
- Q_UNUSED(accuracy);
+ Q_UNUSED(pos)
if (error)
g_error_free(error);
- if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) {
- static_cast<QGeoPositionInfoSourceGeoclueMaster *>(userdata)->singleUpdateSucceeded(
- fields, timestamp, latitude, longitude, altitude, accuracy);
- }
+ QGeoPositionInfoSourceGeoclueMaster *master =
+ static_cast<QGeoPositionInfoSourceGeoclueMaster *>(userdata);
+
+ if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE)
+ master->updatePosition(fields, timestamp, latitude, longitude, altitude, accuracy);
}
-static double knotsToMetersPerSecond(double knots)
+double knotsToMetersPerSecond(double knots)
{
return knots * 1852.0 / 3600.0;
}
+}
+
QGeoPositionInfoSourceGeoclueMaster::QGeoPositionInfoSourceGeoclueMaster(QObject *parent)
-: QGeoPositionInfoSource(parent), QGeoclueMaster(this), m_updateInterval(0), m_pos(0), m_vel(0),
- m_lastPositionIsFresh(false), m_lastVelocityIsFresh(false), m_lastVelocity(qQNaN()),
+: QGeoPositionInfoSource(parent), QGeoclueMaster(this), m_pos(0), m_vel(0),
+ m_lastVelocityIsFresh(false), m_regularUpdateTimedOut(false), m_lastVelocity(qQNaN()),
m_lastDirection(qQNaN()), m_lastClimb(qQNaN()), m_lastPositionFromSatellite(false),
m_methods(AllPositioningMethods), m_running(false)
{
@@ -141,7 +129,6 @@ QGeoPositionInfoSourceGeoclueMaster::QGeoPositionInfoSourceGeoclueMaster(QObject
m_requestTimer.setSingleShot(true);
QObject::connect(&m_requestTimer, SIGNAL(timeout()), this, SLOT(requestUpdateTimeout()));
- QObject::connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(startUpdatesTimeout()));
setPreferredPositioningMethods(AllPositioningMethods);
}
@@ -204,62 +191,47 @@ void QGeoPositionInfoSourceGeoclueMaster::velocityUpdateSucceeded(GeoclueVelocit
m_lastVelocityIsFresh = true;
}
-void QGeoPositionInfoSourceGeoclueMaster::singleUpdateSucceeded(GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy *accuracy)
-{
- QGeoPositionInfo info = geoclueToPositionInfo(fields, timestamp, latitude, longitude, altitude, accuracy);
- m_lastPosition = info;
- if (m_requestTimer.isActive())
- m_requestTimer.stop();
- if (m_lastVelocityIsFresh) {
- if (!qIsNaN(m_lastVelocity))
- info.setAttribute(QGeoPositionInfo::GroundSpeed, m_lastVelocity);
- if (!qIsNaN(m_lastDirection))
- info.setAttribute(QGeoPositionInfo::Direction, m_lastDirection);
- if (!qIsNaN(m_lastClimb))
- info.setAttribute(QGeoPositionInfo::VerticalSpeed, m_lastClimb);
- }
-#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster single update succeeded: ";
- qDebug() << "Lat, lon, alt, speed:" << info.coordinate().latitude() << info.coordinate().longitude() << info.coordinate().altitude() << info.attribute(QGeoPositionInfo::GroundSpeed);
-#endif
- emit positionUpdated(info);
-
- // Only stop positioning if regular updates not active.
- if (!m_running) {
- cleanupPositionSource();
- releaseMasterClient();
- }
-}
-
void QGeoPositionInfoSourceGeoclueMaster::regularUpdateFailed()
{
#ifdef Q_LOCATION_GEOCLUE_DEBUG
qDebug() << "QGeoPositionInfoSourceGeoclueMaster regular update failed.";
#endif
- // Emit timeout and keep on listening in case error condition clears.
- // Currently this is emitted each time an error occurs, and thereby it assumes
- // that there does not come many erroneous updates from position source.
- // This assumption may be invalid.
+
m_lastVelocityIsFresh = false;
- m_lastPositionIsFresh = false;
- if (m_updateTimer.isActive())
+ if (m_running && !m_regularUpdateTimedOut) {
+ m_regularUpdateTimedOut = true;
emit updateTimeout();
+ }
}
-void QGeoPositionInfoSourceGeoclueMaster::regularUpdateSucceeded(GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy *accuracy)
+void QGeoPositionInfoSourceGeoclueMaster::updatePosition(GeocluePositionFields fields,
+ int timestamp, double latitude,
+ double longitude, double altitude,
+ GeoclueAccuracy *accuracy)
{
- m_lastPosition = geoclueToPositionInfo(fields, timestamp, latitude, longitude, altitude, accuracy);
- m_lastPositionIsFresh = true;
+ if (m_requestTimer.isActive())
+ m_requestTimer.stop();
+
+ QGeoCoordinate coordinate(latitude, longitude);
+ if (fields & GEOCLUE_POSITION_FIELDS_ALTITUDE)
+ coordinate.setAltitude(altitude);
+
+ m_lastPosition = QGeoPositionInfo(coordinate, QDateTime::fromTime_t(timestamp));
+
+ if (accuracy) {
+ double horizontalAccuracy = qQNaN();
+ double verticalAccuracy = qQNaN();
+ GeoclueAccuracyLevel accuracyLevel = GEOCLUE_ACCURACY_LEVEL_NONE;
+ geoclue_accuracy_get_details(accuracy, &accuracyLevel, &horizontalAccuracy, &verticalAccuracy);
+
+ m_lastPositionFromSatellite = accuracyLevel & GEOCLUE_ACCURACY_LEVEL_DETAILED;
+
+ if (!qIsNaN(horizontalAccuracy))
+ m_lastPosition.setAttribute(QGeoPositionInfo::HorizontalAccuracy, horizontalAccuracy);
+ if (!qIsNaN(verticalAccuracy))
+ m_lastPosition.setAttribute(QGeoPositionInfo::VerticalAccuracy, verticalAccuracy);
+ }
+
if (m_lastVelocityIsFresh) {
if (!qIsNaN(m_lastVelocity))
m_lastPosition.setAttribute(QGeoPositionInfo::GroundSpeed, m_lastVelocity);
@@ -269,15 +241,24 @@ void QGeoPositionInfoSourceGeoclueMaster::regularUpdateSucceeded(GeocluePosition
m_lastPosition.setAttribute(QGeoPositionInfo::VerticalSpeed, m_lastClimb);
m_lastVelocityIsFresh = false;
}
- // If a non-intervalled startUpdates has been issued, send an update.
- if (!m_updateTimer.isActive()) {
- m_lastPositionIsFresh = false;
- emit positionUpdated(m_lastPosition);
- }
+
+ m_regularUpdateTimedOut = false;
+
+ emit positionUpdated(m_lastPosition);
+
#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster regular update succeeded: ";
- qDebug() << "Lat, lon, alt, speed:" << m_lastPosition.coordinate().latitude() << m_lastPosition.coordinate().longitude() << m_lastPosition.coordinate().altitude() << m_lastPosition.attribute(QGeoPositionInfo::GroundSpeed);
+ qDebug() << "Lat, lon, alt, speed:"
+ << m_lastPosition.coordinate().latitude()
+ << m_lastPosition.coordinate().longitude()
+ << m_lastPosition.coordinate().altitude()
+ << m_lastPosition.attribute(QGeoPositionInfo::GroundSpeed);
#endif
+
+ // Only stop positioning if regular updates not active.
+ if (!m_running) {
+ cleanupPositionSource();
+ releaseMasterClient();
+ }
}
void QGeoPositionInfoSourceGeoclueMaster::cleanupPositionSource()
@@ -292,15 +273,59 @@ void QGeoPositionInfoSourceGeoclueMaster::cleanupPositionSource()
}
}
-void QGeoPositionInfoSourceGeoclueMaster::setUpdateInterval(int msec)
+void QGeoPositionInfoSourceGeoclueMaster::setOptions()
{
- msec = (((msec > 0) && (msec < minimumUpdateInterval())) || msec < 0)? minimumUpdateInterval() : msec;
- QGeoPositionInfoSource::setUpdateInterval(msec);
- m_updateInterval = msec;
- // If update timer is running, set the new interval
- if (m_updateTimer.isActive()) {
- m_updateTimer.setInterval(msec);
+ if (!m_pos)
+ return;
+
+ QVariantMap options;
+ options.insert(QStringLiteral("UpdateInterval"), updateInterval());
+
+ GHashTable *gOptions = g_hash_table_new(g_str_hash, g_str_equal);
+
+ for (QVariantMap::ConstIterator i = options.constBegin(); i != options.constEnd(); ++i) {
+ char *key = qstrdup(i.key().toUtf8().constData());
+
+ const QVariant v = i.value();
+
+ GValue *value = new GValue;
+ *value = G_VALUE_INIT;
+
+ switch (v.userType()) {
+ case QMetaType::QString:
+ g_value_init(value, G_TYPE_STRING);
+ g_value_set_string(value, v.toString().toUtf8().constData());
+ break;
+ case QMetaType::Int:
+ g_value_init(value, G_TYPE_INT);
+ g_value_set_int(value, v.toInt());
+ break;
+ default:
+ qWarning("Unexpected type %d %s", v.userType(), v.typeName());
+ }
+
+ g_hash_table_insert(gOptions, key, value);
+ }
+
+ geoclue_provider_set_options(GEOCLUE_PROVIDER(m_pos), gOptions, 0);
+
+ GHashTableIter iter;
+ char *key;
+ GValue *value;
+
+ g_hash_table_iter_init(&iter, gOptions);
+ while (g_hash_table_iter_next(&iter, reinterpret_cast<void **>(&key), reinterpret_cast<void **>(&value))) {
+ delete[] key;
+ delete value;
}
+
+ g_hash_table_destroy(gOptions);
+}
+
+void QGeoPositionInfoSourceGeoclueMaster::setUpdateInterval(int msec)
+{
+ QGeoPositionInfoSource::setUpdateInterval(qMax(minimumUpdateInterval(), msec));
+ setOptions();
}
void QGeoPositionInfoSourceGeoclueMaster::setPreferredPositioningMethods(PositioningMethods methods)
@@ -315,8 +340,8 @@ void QGeoPositionInfoSourceGeoclueMaster::setPreferredPositioningMethods(Positio
<< ", and set them to:" << preferredPositioningMethods();
#endif
- m_lastPositionIsFresh = false;
m_lastVelocityIsFresh = false;
+ m_regularUpdateTimedOut = false;
// Don't start Geoclue provider until necessary. Don't currently have a master client, no need
// no recreate one.
@@ -330,6 +355,7 @@ void QGeoPositionInfoSourceGeoclueMaster::setPreferredPositioningMethods(Positio
// Restart Geoclue provider with new requirements.
configurePositionSource();
+ setOptions();
}
QGeoPositionInfo QGeoPositionInfoSourceGeoclueMaster::lastKnownPosition(bool fromSatellitePositioningMethodsOnly) const
@@ -361,14 +387,9 @@ void QGeoPositionInfoSourceGeoclueMaster::startUpdates()
m_running = true;
// Start Geoclue provider.
- if (!hasMasterClient())
+ if (!hasMasterClient()) {
configurePositionSource();
-
- if (m_updateInterval > 0) {
-#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster startUpdates with interval: " << m_updateInterval;
-#endif
- m_updateTimer.start(m_updateInterval);
+ setOptions();
}
// Emit last known position on start.
@@ -376,20 +397,10 @@ void QGeoPositionInfoSourceGeoclueMaster::startUpdates()
QMetaObject::invokeMethod(this, "positionUpdated", Qt::QueuedConnection,
Q_ARG(QGeoPositionInfo, m_lastPosition));
}
-
- // m_pos and m_vel are likely to be invalid until Geoclue master selects a position provider.
- if (!m_pos)
- return;
-
- g_signal_connect (G_OBJECT (m_pos), "position-changed",
- G_CALLBACK (position_changed),this);
- if (m_vel) {
- g_signal_connect (G_OBJECT (m_vel), "velocity-changed",
- G_CALLBACK (velocity_changed),this);
- }
}
-int QGeoPositionInfoSourceGeoclueMaster::minimumUpdateInterval() const {
+int QGeoPositionInfoSourceGeoclueMaster::minimumUpdateInterval() const
+{
return MINIMUM_UPDATE_INTERVAL;
}
@@ -398,8 +409,6 @@ void QGeoPositionInfoSourceGeoclueMaster::stopUpdates()
if (!m_running)
return;
- if (m_updateTimer.isActive())
- m_updateTimer.stop();
if (m_pos)
g_signal_handlers_disconnect_by_func(G_OBJECT(m_pos), (void *)position_changed, this);
if (m_vel)
@@ -427,8 +436,10 @@ void QGeoPositionInfoSourceGeoclueMaster::requestUpdate(int timeout)
return;
}
- if (!hasMasterClient())
+ if (!hasMasterClient()) {
configurePositionSource();
+ setOptions();
+ }
// Create better logic for timeout value (specs leave it impl dependant).
// Especially if there are active updates ongoing, there is no point of waiting
@@ -454,27 +465,18 @@ void QGeoPositionInfoSourceGeoclueMaster::requestUpdateTimeout()
}
}
-void QGeoPositionInfoSourceGeoclueMaster::startUpdatesTimeout()
-{
-#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster startUpdates timeout occurred.";
-#endif
- // Check if there are position updates since last positionUpdated().
- // Do not however send timeout, that's reserved for signaling errors.
- if (m_lastPositionIsFresh) {
- emit positionUpdated(m_lastPosition);
- m_lastPositionIsFresh = false;
- m_lastVelocityIsFresh = false;
- }
-}
-
void QGeoPositionInfoSourceGeoclueMaster::positionProviderChanged(const QByteArray &service, const QByteArray &path)
{
if (m_pos)
cleanupPositionSource();
- if (service.isEmpty() || path.isEmpty())
+ if (service.isEmpty() || path.isEmpty()) {
+ if (!m_regularUpdateTimedOut) {
+ m_regularUpdateTimedOut = true;
+ emit updateTimeout();
+ }
return;
+ }
m_pos = geoclue_position_new(service.constData(), path.constData());
if (m_pos) {
@@ -485,6 +487,7 @@ void QGeoPositionInfoSourceGeoclueMaster::positionProviderChanged(const QByteArr
// Get the current position immediately.
geoclue_position_get_position_async(m_pos, position_callback, this);
+ setOptions();
m_vel = geoclue_velocity_new(service.constData(), path.constData());
if (m_vel && m_running) {
@@ -510,41 +513,6 @@ bool QGeoPositionInfoSourceGeoclueMaster::configurePositionSource()
return false;
}
-// Helper function to convert data into a QGeoPositionInfo
-QGeoPositionInfo QGeoPositionInfoSourceGeoclueMaster::geoclueToPositionInfo(
- GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy * accuracy)
-{
- QGeoCoordinate coordinate(latitude, longitude);
- QDateTime dateTime = QDateTime();
- dateTime.setTime_t(timestamp);
- if (fields & GEOCLUE_POSITION_FIELDS_ALTITUDE) {
- coordinate.setAltitude(altitude);
- }
- QGeoPositionInfo info(coordinate, dateTime);
- if (accuracy) {
- double horizontalAccuracy = qQNaN();
- double verticalAccuracy = qQNaN();
- GeoclueAccuracyLevel accuracyLevel = GEOCLUE_ACCURACY_LEVEL_NONE;
- geoclue_accuracy_get_details(accuracy, &accuracyLevel, &horizontalAccuracy, &verticalAccuracy);
-#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster::accuracy horizontal vertical level: " << horizontalAccuracy << verticalAccuracy << accuracyLevel;
-#endif
- m_lastPositionFromSatellite = accuracyLevel & GEOCLUE_ACCURACY_LEVEL_DETAILED;
-
- if (!qIsNaN(horizontalAccuracy))
- info.setAttribute(QGeoPositionInfo::HorizontalAccuracy, horizontalAccuracy);
- if (!qIsNaN(verticalAccuracy))
- info.setAttribute(QGeoPositionInfo::VerticalAccuracy, verticalAccuracy);
- }
- return info;
-}
-
-
QGeoPositionInfoSource::Error QGeoPositionInfoSourceGeoclueMaster::error() const
{
return NoError;
diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h
index 7e980317..3f88334a 100644
--- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h
+++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h
@@ -68,6 +68,7 @@ QT_BEGIN_NAMESPACE
class QGeoPositionInfoSourceGeoclueMaster : public QGeoPositionInfoSource, public QGeoclueMaster
{
Q_OBJECT
+
public:
QGeoPositionInfoSourceGeoclueMaster(QObject *parent = 0);
~QGeoPositionInfoSourceGeoclueMaster();
@@ -79,19 +80,11 @@ public:
void setPreferredPositioningMethods(PositioningMethods methods);
int minimumUpdateInterval() const;
- void singleUpdateSucceeded(GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy *accuracy);
+ void updatePosition(GeocluePositionFields fields, int timestamp, double latitude,
+ double longitude, double altitude, GeoclueAccuracy *accuracy);
+
void regularUpdateFailed();
- void regularUpdateSucceeded(GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy *accuracy);
+
void velocityUpdateFailed();
void velocityUpdateSucceeded(GeoclueVelocityFields fields, int timestamp, double speed,
double direction, double climb);
@@ -105,26 +98,19 @@ public slots:
private slots:
void requestUpdateTimeout();
- void startUpdatesTimeout();
void positionProviderChanged(const QByteArray &service, const QByteArray &path);
private:
bool configurePositionSource();
void cleanupPositionSource();
- QGeoPositionInfo geoclueToPositionInfo(GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy * accuracy);
+ void setOptions();
+
private:
- int m_updateInterval;
GeocluePosition *m_pos;
GeoclueVelocity *m_vel;
- QTimer m_updateTimer;
QTimer m_requestTimer;
- bool m_lastPositionIsFresh;
bool m_lastVelocityIsFresh;
+ bool m_regularUpdateTimedOut;
double m_lastVelocity;
double m_lastDirection;
double m_lastClimb;
diff --git a/src/plugins/position/positionpoll/positionpoll.pro b/src/plugins/position/positionpoll/positionpoll.pro
index dd26f522..1b7e38f5 100644
--- a/src/plugins/position/positionpoll/positionpoll.pro
+++ b/src/plugins/position/positionpoll/positionpoll.pro
@@ -1,5 +1,5 @@
TARGET = qtposition_positionpoll
-QT += positioning
+QT = core positioning
PLUGIN_TYPE = position
load(qt_plugin)
diff --git a/src/plugins/position/simulator/simulator.pro b/src/plugins/position/simulator/simulator.pro
index e1105f17..17948ca5 100644
--- a/src/plugins/position/simulator/simulator.pro
+++ b/src/plugins/position/simulator/simulator.pro
@@ -1,5 +1,5 @@
TARGET = qtposition_simulator
-QT += positioning gui
+QT = core network positioning
PLUGIN_TYPE = position
load(qt_plugin)
diff --git a/src/positioning/qdeclarativegeoaddress.cpp b/src/positioning/qdeclarativegeoaddress.cpp
index 6d14e48f..671b5881 100644
--- a/src/positioning/qdeclarativegeoaddress.cpp
+++ b/src/positioning/qdeclarativegeoaddress.cpp
@@ -131,7 +131,7 @@ void QDeclarativeGeoAddress::setAddress(const QGeoAddress &address)
string to use to display the address to the user. It typically takes the format of
an address as found on an envelope, but this is not always necessarily the case.
- The adddress \c text is either automatically generated or explicitly assigned,
+ The address \c text is either automatically generated or explicitly assigned,
this can be determined by checking \l isTextGenerated.
If an empty string is assigned to \c text, then \l isTextGenerated will be set
diff --git a/src/positioning/qgeoaddress.cpp b/src/positioning/qgeoaddress.cpp
index 180d29dd..4b8ef36a 100644
--- a/src/positioning/qgeoaddress.cpp
+++ b/src/positioning/qgeoaddress.cpp
@@ -415,7 +415,7 @@ bool QGeoAddress::operator==(const QGeoAddress &other) const
to use to display the address to the user. It typically takes the format of
an address as found on an envelope, but this is not always necessarily the case.
- The adddress text is either automatically generated or explicitly assigned.
+ The address text is either automatically generated or explicitly assigned.
This can be determined by checking \l {QGeoAddress::isTextGenerated()} {isTextGenerated}.
If an empty string is provided to setText(), then isTextGenerated() will be set
diff --git a/tests/applications/declarative_map/map3d.qml b/tests/applications/declarative_map/map3d.qml
index 36ef927c..9d8d9fac 100644
--- a/tests/applications/declarative_map/map3d.qml
+++ b/tests/applications/declarative_map/map3d.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.test 5.0
import "common" as Common
@@ -653,7 +653,7 @@ Rectangle {
anchors.fill: parent
target: map
enabled: false
- focus: true // enables keyboard control for convinience
+ focus: true // enables keyboard control for convenience
replaySpeedFactor: 1.7 // replay with 1.1 times the recording speed to better see what happens
Text {
id: pinchGenText
diff --git a/tests/applications/declarative_map/map3d_mousetest.qml b/tests/applications/declarative_map/map3d_mousetest.qml
index d07031b0..cc6dbda1 100644
--- a/tests/applications/declarative_map/map3d_mousetest.qml
+++ b/tests/applications/declarative_map/map3d_mousetest.qml
@@ -40,7 +40,7 @@
import QtQuick 2.0
import QtPositioning 5.2
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.test 5.0
import "common" as Common
@@ -274,7 +274,7 @@ Item {
anchors.fill: parent
target: map
enabled: false
- focus: true // enables keyboard control for convinience
+ focus: true // enables keyboard control for convenience
replaySpeedFactor: 1.1 // replay with 1.1 times the recording speed to better see what happens
Text {
text: "PinchArea state: " + pinchGenerator.state + "\n"
diff --git a/tests/auto/declarative_core/tst_category.qml b/tests/auto/declarative_core/tst_category.qml
index 0f8addb8..9f8b7adc 100644
--- a/tests/auto/declarative_core/tst_category.qml
+++ b/tests/auto/declarative_core/tst_category.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_core/tst_categorymodel.qml b/tests/auto/declarative_core/tst_categorymodel.qml
index 0e867bdf..6190963e 100644
--- a/tests/auto/declarative_core/tst_categorymodel.qml
+++ b/tests/auto/declarative_core/tst_categorymodel.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
@@ -87,7 +87,7 @@ TestCase {
function test_hierarchicalModel() {
var modelSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
- var categoryModel = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0;'
+ var categoryModel = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3;'
+ 'VisualDataModel { model: CategoryModel {} delegate: Item {} }',
testCase, "VisualDataModel");
@@ -160,7 +160,7 @@ TestCase {
function test_flatModel() {
var modelSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
- var categoryModel = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0;'
+ var categoryModel = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3;'
+ 'VisualDataModel { model: CategoryModel {} delegate: Item {} }',
testCase, "VisualDataModel");
@@ -218,7 +218,7 @@ TestCase {
}
function test_error() {
- var testModel = Qt.createQmlObject('import QtLocation 5.0; CategoryModel {}', testCase, "CategoryModel");
+ var testModel = Qt.createQmlObject('import QtLocation 5.3; CategoryModel {}', testCase, "CategoryModel");
var statusChangedSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
statusChangedSpy.target = testModel;
diff --git a/tests/auto/declarative_core/tst_contactdetail.qml b/tests/auto/declarative_core/tst_contactdetail.qml
index 23641497..5116d78d 100644
--- a/tests/auto/declarative_core/tst_contactdetail.qml
+++ b/tests/auto/declarative_core/tst_contactdetail.qml
@@ -40,7 +40,7 @@
****************************************************************************/
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_core/tst_editorialmodel.qml b/tests/auto/declarative_core/tst_editorialmodel.qml
index ae01b4fd..3135a05b 100644
--- a/tests/auto/declarative_core/tst_editorialmodel.qml
+++ b/tests/auto/declarative_core/tst_editorialmodel.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
@@ -193,7 +193,7 @@ TestCase {
}
function createModel() {
- return Qt.createQmlObject('import QtLocation 5.0; EditorialModel {}',
+ return Qt.createQmlObject('import QtLocation 5.3; EditorialModel {}',
testCase, "editorialModel");
}
}
diff --git a/tests/auto/declarative_core/tst_imagemodel.qml b/tests/auto/declarative_core/tst_imagemodel.qml
index 31f1e448..eb2a1ce2 100644
--- a/tests/auto/declarative_core/tst_imagemodel.qml
+++ b/tests/auto/declarative_core/tst_imagemodel.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
@@ -193,7 +193,7 @@ TestCase {
}
function createModel() {
- return Qt.createQmlObject('import QtLocation 5.0; ImageModel {}',
+ return Qt.createQmlObject('import QtLocation 5.3; ImageModel {}',
testCase, "imageModel");
}
}
diff --git a/tests/auto/declarative_core/tst_map_routing.qml b/tests/auto/declarative_core/tst_map_routing.qml
index bc5962b9..605e1e15 100644
--- a/tests/auto/declarative_core/tst_map_routing.qml
+++ b/tests/auto/declarative_core/tst_map_routing.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
Item {
diff --git a/tests/auto/declarative_core/tst_place.qml b/tests/auto/declarative_core/tst_place.qml
index 598872a7..cb25f76d 100644
--- a/tests/auto/declarative_core/tst_place.qml
+++ b/tests/auto/declarative_core/tst_place.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import "utils.js" as Utils
@@ -328,8 +328,8 @@ TestCase {
function test_categories() {
var categories = new Array(2);
- categories[0] = Qt.createQmlObject('import QtLocation 5.0; Category { categoryId: "cat-id-1"; name: "Category 1" }', testCase, "Category1");
- categories[1] = Qt.createQmlObject('import QtLocation 5.0; Category { categoryId: "cat-id-2"; name: "Category 2" }', testCase, "Category2");
+ categories[0] = Qt.createQmlObject('import QtLocation 5.3; Category { categoryId: "cat-id-1"; name: "Category 1" }', testCase, "Category1");
+ categories[1] = Qt.createQmlObject('import QtLocation 5.3; Category { categoryId: "cat-id-2"; name: "Category 2" }', testCase, "Category2");
var signalSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
signalSpy.target = testPlace;
@@ -366,7 +366,7 @@ TestCase {
}
function test_supplier() {
- var supplier = Qt.createQmlObject('import QtLocation 5.0; Supplier { supplierId: "sup-id-1"; name: "Category 1" }', testCase, "Supplier1");
+ var supplier = Qt.createQmlObject('import QtLocation 5.3; Supplier { supplierId: "sup-id-1"; name: "Category 1" }', testCase, "Supplier1");
var signalSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
signalSpy.target = testPlace;
@@ -422,7 +422,7 @@ TestCase {
}
function test_ratings() {
- var ratings = Qt.createQmlObject('import QtLocation 5.0; Ratings { average: 3; count: 100 }', testCase, "Rating1");
+ var ratings = Qt.createQmlObject('import QtLocation 5.3; Ratings { average: 3; count: 100 }', testCase, "Rating1");
var signalSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
signalSpy.target = testPlace;
@@ -449,7 +449,7 @@ TestCase {
function test_extendedAttributes() {
verify(testPlace.extendedAttributes);
- testPlace.extendedAttributes["foo"] = Qt.createQmlObject('import QtLocation 5.0; PlaceAttribute { text: "Foo"; label: "Foo label" }', testCase, 'PlaceAttribute');
+ testPlace.extendedAttributes["foo"] = Qt.createQmlObject('import QtLocation 5.3; PlaceAttribute { text: "Foo"; label: "Foo label" }', testCase, 'PlaceAttribute');
verify(testPlace.extendedAttributes.foo);
compare(testPlace.extendedAttributes.foo.text, "Foo");
@@ -462,7 +462,7 @@ TestCase {
function test_contactDetailsProperty() {
verify(testPlace.contactDetails);
- testPlace.contactDetails["phone"] = Qt.createQmlObject('import QtLocation 5.0; ContactDetail { label: "Test Label"; value: "Detail Value" }', testCase, 'ContactDetail');
+ testPlace.contactDetails["phone"] = Qt.createQmlObject('import QtLocation 5.3; ContactDetail { label: "Test Label"; value: "Detail Value" }', testCase, 'ContactDetail');
verify(testPlace.contactDetails.phone);
compare(testPlace.contactDetails.phone[0].label, "Test Label");
@@ -502,7 +502,7 @@ TestCase {
// Read a place
- var readPlace = Qt.createQmlObject('import QtLocation 5.0; Place { }', testCase, "test_saveload");
+ var readPlace = Qt.createQmlObject('import QtLocation 5.3; Place { }', testCase, "test_saveload");
signalSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
signalSpy.target = readPlace;
@@ -539,7 +539,7 @@ TestCase {
// Remove a place
- var removePlace = Qt.createQmlObject('import QtLocation 5.0; Place { }', testCase, "test_saveload");
+ var removePlace = Qt.createQmlObject('import QtLocation 5.3; Place { }', testCase, "test_saveload");
signalSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
signalSpy.target = removePlace;
@@ -575,7 +575,7 @@ TestCase {
}
function test_copy() {
- var place = Qt.createQmlObject('import QtLocation 5.0; Place { }', this);
+ var place = Qt.createQmlObject('import QtLocation 5.3; Place { }', this);
place.plugin = testPlugin;
place.copyFrom(dummyPlace);
compare(place.placeId, "");
@@ -584,13 +584,13 @@ TestCase {
}
function test_contactDetails(data) {
- var place = Qt.createQmlObject('import QtLocation 5.0; Place {}', this);
+ var place = Qt.createQmlObject('import QtLocation 5.3; Place {}', this);
var signalSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
signalSpy.target = place;
signalSpy.signalName = data.signalName;
- var detail1 = Qt.createQmlObject('import QtLocation 5.0; ContactDetail {}', this);
+ var detail1 = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', this);
detail1.label = "Detail1";
detail1.value = "555-detail1";
@@ -607,7 +607,7 @@ TestCase {
listView.model = place.contactDetails[data.contactType];
compare(listView.count, 1);
- var detail2 = Qt.createQmlObject('import QtLocation 5.0; ContactDetail {}', this);
+ var detail2 = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', this);
detail2.label = "Detail2";
detail2.value = "555-detail2";
diff --git a/tests/auto/declarative_core/tst_placeattribute.qml b/tests/auto/declarative_core/tst_placeattribute.qml
index daa237b4..5fd569d0 100644
--- a/tests/auto/declarative_core/tst_placeattribute.qml
+++ b/tests/auto/declarative_core/tst_placeattribute.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_core/tst_placeicon.qml b/tests/auto/declarative_core/tst_placeicon.qml
index d1f45049..6c6b8e74 100644
--- a/tests/auto/declarative_core/tst_placeicon.qml
+++ b/tests/auto/declarative_core/tst_placeicon.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_core/tst_placesearchmodel.qml b/tests/auto/declarative_core/tst_placesearchmodel.qml
index 2020a4f8..68c21bb3 100644
--- a/tests/auto/declarative_core/tst_placesearchmodel.qml
+++ b/tests/auto/declarative_core/tst_placesearchmodel.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import "utils.js" as Utils
@@ -114,13 +114,13 @@ TestCase {
}
function test_setAndGet(data) {
- var testModel = Qt.createQmlObject('import QtLocation 5.0; PlaceSearchModel {}', testCase, "PlaceSearchModel");
+ var testModel = Qt.createQmlObject('import QtLocation 5.3; PlaceSearchModel {}', testCase, "PlaceSearchModel");
Utils.testObjectProperties(testCase, testModel, data);
delete testModel;
}
function test_search_data() {
- var park = Qt.createQmlObject('import QtLocation 5.0; Category {name: "Park"; categoryId: "c2e1252c-b997-44fc-8165-e53dd00f66a7"}', testCase, "Category");
+ var park = Qt.createQmlObject('import QtLocation 5.3; Category {name: "Park"; categoryId: "c2e1252c-b997-44fc-8165-e53dd00f66a7"}', testCase, "Category");
return [
{
tag: "searchTerm, multiple results",
@@ -170,7 +170,7 @@ TestCase {
}
function test_search(data) {
- var testModel = Qt.createQmlObject('import QtLocation 5.0; PlaceSearchModel {}', testCase, "PlaceSearchModel");
+ var testModel = Qt.createQmlObject('import QtLocation 5.3; PlaceSearchModel {}', testCase, "PlaceSearchModel");
testModel.plugin = testPlugin;
var statusChangedSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
@@ -230,7 +230,7 @@ TestCase {
}
function test_cancel() {
- var testModel = Qt.createQmlObject('import QtLocation 5.0; PlaceSearchModel {}', testCase, "PlaceSearchModel");
+ var testModel = Qt.createQmlObject('import QtLocation 5.3; PlaceSearchModel {}', testCase, "PlaceSearchModel");
testModel.plugin = testPlugin;
var statusChangedSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
@@ -274,7 +274,7 @@ TestCase {
}
function test_error() {
- var testModel = Qt.createQmlObject('import QtLocation 5.0; PlaceSearchModel {}', testCase, "PlaceSearchModel");
+ var testModel = Qt.createQmlObject('import QtLocation 5.3; PlaceSearchModel {}', testCase, "PlaceSearchModel");
var statusChangedSpy = Qt.createQmlObject('import QtTest 1.0; SignalSpy {}', testCase, "SignalSpy");
statusChangedSpy.target = testModel;
diff --git a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml b/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
index 51f348e3..2c20dd0f 100644
--- a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
+++ b/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import "utils.js" as Utils
diff --git a/tests/auto/declarative_core/tst_plugin.qml b/tests/auto/declarative_core/tst_plugin.qml
index abb5f796..5c4b32cf 100644
--- a/tests/auto/declarative_core/tst_plugin.qml
+++ b/tests/auto/declarative_core/tst_plugin.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
Item {
diff --git a/tests/auto/declarative_core/tst_positionsource.qml b/tests/auto/declarative_core/tst_positionsource.qml
index 405c46ae..9984e783 100644
--- a/tests/auto/declarative_core/tst_positionsource.qml
+++ b/tests/auto/declarative_core/tst_positionsource.qml
@@ -162,7 +162,7 @@ TestCase {
compare(directionSpy.count, 2)
fuzzyCompare(testingSource.position.direction, 45, 0.1)
verify(testingSource.position.speedValid)
- verify(testingSource.position.speed > 15000)
+ verify(testingSource.position.speed > 10000)
testingSource.active = false;
wait(2500);
@@ -173,6 +173,6 @@ TestCase {
compare(directionSpy.count, 2)
fuzzyCompare(testingSource.position.direction, 45, 0.1)
verify(testingSource.position.speedValid)
- verify(testingSource.position.speed > 15000)
+ verify(testingSource.position.speed > 10000)
}
}
diff --git a/tests/auto/declarative_core/tst_ratings.qml b/tests/auto/declarative_core/tst_ratings.qml
index 9075c1d4..00ebe065 100644
--- a/tests/auto/declarative_core/tst_ratings.qml
+++ b/tests/auto/declarative_core/tst_ratings.qml
@@ -40,7 +40,7 @@
****************************************************************************/
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_core/tst_reviewmodel.qml b/tests/auto/declarative_core/tst_reviewmodel.qml
index 62a7ac5e..187136e3 100644
--- a/tests/auto/declarative_core/tst_reviewmodel.qml
+++ b/tests/auto/declarative_core/tst_reviewmodel.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
@@ -208,7 +208,7 @@ TestCase {
}
function createModel() {
- return Qt.createQmlObject('import QtLocation 5.0; ReviewModel {}',
+ return Qt.createQmlObject('import QtLocation 5.3; ReviewModel {}',
testCase, "reviewModel");
}
}
diff --git a/tests/auto/declarative_core/tst_supplier.qml b/tests/auto/declarative_core/tst_supplier.qml
index a98bb79e..a412fde3 100644
--- a/tests/auto/declarative_core/tst_supplier.qml
+++ b/tests/auto/declarative_core/tst_supplier.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_core/tst_user.qml b/tests/auto/declarative_core/tst_user.qml
index f078a6e7..5d8fa063 100644
--- a/tests/auto/declarative_core/tst_user.qml
+++ b/tests/auto/declarative_core/tst_user.qml
@@ -40,7 +40,7 @@
****************************************************************************/
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import "utils.js" as Utils
TestCase {
diff --git a/tests/auto/declarative_ui/tst_map.qml b/tests/auto/declarative_ui/tst_map.qml
index bf17a19f..df49df49 100644
--- a/tests/auto/declarative_ui/tst_map.qml
+++ b/tests/auto/declarative_ui/tst_map.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
Item {
diff --git a/tests/auto/declarative_ui/tst_map_coordinateanimation.qml b/tests/auto/declarative_ui/tst_map_coordinateanimation.qml
index 54448973..e6d86b1e 100644
--- a/tests/auto/declarative_ui/tst_map_coordinateanimation.qml
+++ b/tests/auto/declarative_ui/tst_map_coordinateanimation.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.3
Item {
diff --git a/tests/auto/declarative_ui/tst_map_geocoding.qml b/tests/auto/declarative_ui/tst_map_geocoding.qml
index 1f5f508a..3b40b94c 100644
--- a/tests/auto/declarative_ui/tst_map_geocoding.qml
+++ b/tests/auto/declarative_ui/tst_map_geocoding.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
Item {
diff --git a/tests/auto/declarative_ui/tst_map_item.qml b/tests/auto/declarative_ui/tst_map_item.qml
index 80d5d132..544f27ed 100644
--- a/tests/auto/declarative_ui/tst_map_item.qml
+++ b/tests/auto/declarative_ui/tst_map_item.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.test 5.0
import QtPositioning 5.0
diff --git a/tests/auto/declarative_ui/tst_map_item_details.qml b/tests/auto/declarative_ui/tst_map_item_details.qml
index ca7ca8c2..ee8f4608 100644
--- a/tests/auto/declarative_ui/tst_map_item_details.qml
+++ b/tests/auto/declarative_ui/tst_map_item_details.qml
@@ -42,7 +42,7 @@
import QtQuick 2.0
import QtTest 1.0
import QtPositioning 5.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtLocation.test 5.0
Item {
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 7c32fd65..d923f4f3 100644
--- a/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
+++ b/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import QtLocation.test 5.0
diff --git a/tests/auto/declarative_ui/tst_map_itemview.qml b/tests/auto/declarative_ui/tst_map_itemview.qml
index a24bd8c7..6a7c9faa 100644
--- a/tests/auto/declarative_ui/tst_map_itemview.qml
+++ b/tests/auto/declarative_ui/tst_map_itemview.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import QtLocation.test 5.0
@@ -310,13 +310,13 @@ Item {
clear_data();
/*
// basic create-destroy without items, mustn't crash
- var dynamicMap = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0; Map { x:0; y:0; objectName: \'dynomik map\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
+ var dynamicMap = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3; Map { x:0; y:0; objectName: \'dynomik map\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
verify(dynamicMap !== null)
dynamicMap.destroy(1)
//wait(5)
// add rm add, destroy with item on it
- dynamicMap = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0; Map { x:0; y:0; objectName: \'dynomik map\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
+ dynamicMap = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3; Map { x:0; y:0; objectName: \'dynomik map\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
verify(dynamicMap !== null)
dynamicMap.addMapItem(externalCircle);
compare(dynamicMap.mapItems.length, 1)
@@ -328,8 +328,8 @@ Item {
//wait(5)
// try adding same item to two maps, will not be allowed
- var dynamicMap2 = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0; Map { x:0; y:0; objectName: \'dynomik map2\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
- dynamicMap = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0; Map { x:0; y:0; objectName: \'dynomik map\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
+ var dynamicMap2 = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3; Map { x:0; y:0; objectName: \'dynomik map2\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
+ dynamicMap = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3; Map { x:0; y:0; objectName: \'dynomik map\'; width: masterItem.width; height: masterItem.height; plugin: testPlugin} ', masterItem, "dynamicCreationErrors" );
verify(dynamicMap !== null)
verify(dynamicMap2 !== null)
compare(dynamicMap.mapItems.length, 0)
@@ -339,7 +339,7 @@ Item {
compare(dynamicMap2.mapItems.length, 0)
// create and destroy a dynamic item that is in the map
- var dynamicCircle = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.0; MapCircle { objectName: \'dynamic circle 1\'; center { latitude: 5; longitude: 5 } radius: 15 } ', masterItem, "dynamicCreationErrors" );
+ var dynamicCircle = Qt.createQmlObject('import QtQuick 2.0; import QtLocation 5.3; MapCircle { objectName: \'dynamic circle 1\'; center { latitude: 5; longitude: 5 } radius: 15 } ', masterItem, "dynamicCreationErrors" );
verify (dynamicCircle !== null)
compare(map.mapItems.length, 0)
map.addMapItem(dynamicCircle)
@@ -371,7 +371,7 @@ Item {
mapForView.removeMapItem(internalCircle)
compare(mapForView.mapItems.length, 7)
// Basic adding and removing of dynamic object
- var dynamicCircle = Qt.createQmlObject( "import QtQuick 2.0; import QtLocation 5.0; MapCircle {radius: 4000; center: mapDefaultCenter}", map, "");
+ var dynamicCircle = Qt.createQmlObject( "import QtQuick 2.0; import QtLocation 5.3; MapCircle {radius: 4000; center: mapDefaultCenter}", map, "");
mapForView.addMapItem(dynamicCircle)
compare(mapForView.mapItems.length, 8)
mapForView.removeMapItem(dynamicCircle)
diff --git a/tests/auto/declarative_ui/tst_map_maptype.qml b/tests/auto/declarative_ui/tst_map_maptype.qml
index 642091e9..e9a52d09 100644
--- a/tests/auto/declarative_ui/tst_map_maptype.qml
+++ b/tests/auto/declarative_ui/tst_map_maptype.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
TestCase {
id: testCase
diff --git a/tests/auto/declarative_ui/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml
index a8bff2e8..0e7c87a7 100644
--- a/tests/auto/declarative_ui/tst_map_mouse.qml
+++ b/tests/auto/declarative_ui/tst_map_mouse.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import QtLocation.test 5.0
diff --git a/tests/auto/declarative_ui/tst_map_pinch_and_flick.qml b/tests/auto/declarative_ui/tst_map_pinch_and_flick.qml
index 4b46674f..bb6e1ee3 100644
--- a/tests/auto/declarative_ui/tst_map_pinch_and_flick.qml
+++ b/tests/auto/declarative_ui/tst_map_pinch_and_flick.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
import QtTest 1.0
-import QtLocation 5.0
+import QtLocation 5.3
import QtPositioning 5.2
import QtLocation.test 5.0
@@ -96,16 +96,10 @@ Item {
SignalSpy {id: pinchUpdatedSpy; target: map.gesture; signalName: 'pinchUpdated'}
SignalSpy {id: pinchFinishedSpy; target: map.gesture; signalName: 'pinchFinished'}
SignalSpy {id: pinchMaximumZoomLevelChangeSpy; target: map.gesture; signalName: 'maximumZoomLevelChangeChanged'}
- //SignalSpy {id: pinchMinimumZoomLevelSpy; target: map.gesture; signalName: 'minimumZoomLevelChanged'}
- //SignalSpy {id: pinchMaximumZoomLevelSpy; target: map.gesture; signalName: 'maximumZoomLevelChanged'}
- //SignalSpy {id: pinchMinimumRotationSpy; target: map.gesture; signalName: 'minimumRotationChanged'}
- //SignalSpy {id: pinchMaximumRotationSpy; target: map.gesture; signalName: 'maximumRotationChanged'}
- SignalSpy {id: pinchRotationFactorSpy; target: map.gesture; signalName: 'rotationFactorChanged'}
SignalSpy {id: gestureEnabledSpy; target: map.gesture; signalName: 'enabledChanged'}
SignalSpy {id: pinchActiveSpy; target: map.gesture; signalName: 'pinchActiveChanged'}
SignalSpy {id: pinchActiveGesturesSpy; target: map.gesture; signalName: 'activeGesturesChanged'}
SignalSpy {id: mapZoomLevelSpy; target: map; signalName: 'zoomLevelChanged'}
- SignalSpy {id: mapBearingSpy; target: map; signalName: 'bearingChanged'}
SignalSpy {id: flickDecelerationSpy; target: map.gesture; signalName: 'flickDecelerationChanged'}
SignalSpy {id: movementStoppedSpy; target: map.gesture; signalName: 'movementStopped'}
SignalSpy {id: flickStartedSpy; target: map.gesture; signalName: 'flickStarted'}
@@ -129,16 +123,10 @@ Item {
pinchUpdatedSpy.clear()
pinchFinishedSpy.clear()
pinchMaximumZoomLevelChangeSpy.clear()
- //pinchMinimumZoomLevelSpy.clear()
- //pinchMaximumZoomLevelSpy.clear()
- //pinchMinimumRotationSpy.clear()
- //pinchMaximumRotationSpy.clear()
- pinchRotationFactorSpy.clear()
gestureEnabledSpy.clear()
pinchActiveSpy.clear()
pinchActiveGesturesSpy.clear()
mapZoomLevelSpy.clear()
- mapBearingSpy.clear()
flickDecelerationSpy.clear()
movementStoppedSpy.clear()
flickStartedSpy.clear()
@@ -162,62 +150,22 @@ Item {
compare(map.gesture.isPinchActive, false)
verify(map.gesture.activeGestures & MapGestureArea.ZoomGesture)
- verify(!(map.gesture.activeGestures & MapGestureArea.RotationGesture))
- verify(!(map.gesture.activeGestures & MapGestureArea.TiltGesture))
map.gesture.activeGestures = MapGestureArea.NoGesture
compare(map.gesture.activeGestures, MapGestureArea.NoGesture)
compare(pinchActiveGesturesSpy.count, 1)
map.gesture.activeGestures = MapGestureArea.NoGesture
compare(map.gesture.activeGestures, MapGestureArea.NoGesture)
compare(pinchActiveGesturesSpy.count, 1)
- map.gesture.activeGestures = MapGestureArea.ZoomGesture | MapGestureArea.RotationGesture
- compare(map.gesture.activeGestures, MapGestureArea.ZoomGesture | MapGestureArea.RotationGesture)
+ map.gesture.activeGestures = MapGestureArea.ZoomGesture | MapGestureArea.PanGesture
+ compare(map.gesture.activeGestures, MapGestureArea.ZoomGesture | MapGestureArea.PanGesture)
compare(pinchActiveGesturesSpy.count, 2)
- map.gesture.activeGestures = MapGestureArea.RotationGesture
- compare(map.gesture.activeGestures, MapGestureArea.RotationGesture)
+ map.gesture.activeGestures = MapGestureArea.PanGesture
+ compare(map.gesture.activeGestures, MapGestureArea.PanGesture)
compare(pinchActiveGesturesSpy.count, 3)
map.gesture.activeGestures = MapGestureArea.ZoomGesture
compare(map.gesture.activeGestures, MapGestureArea.ZoomGesture)
compare(pinchActiveGesturesSpy.count, 4)
- /*
- compare(map.gesture.minimumZoomLevel, map.minimumZoomLevel)
- map.gesture.minimumZoomLevel = 5
- compare(pinchMinimumZoomLevelSpy.count, 1)
- compare(map.gesture.minimumZoomLevel, 5)
- map.gesture.minimumZoomLevel = -1 // too small
- map.gesture.minimumZoomLevel = 492 // too big
- compare(pinchMinimumZoomLevelSpy.count, 1)
- compare(map.gesture.minimumZoomLevel, 5)
- map.gesture.minimumZoomLevel = map.minimumZoomLevel
- compare(pinchMinimumZoomLevelSpy.count, 2)
- compare(map.gesture.minimumZoomLevel, map.minimumZoomLevel)
-
- compare(map.gesture.maximumZoomLevel, map.maximumZoomLevel)
- map.gesture.maximumZoomLevel = 9
- compare (pinchMaximumZoomLevelSpy.count, 1)
- compare(map.gesture.maximumZoomLevel, 9)
- map.gesture.maximumZoomLevel = -1 // too small
- map.gesture.maximumZoomLevel = 3234 // too big
- compare(pinchMaximumZoomLevelSpy.count, 1)
- compare(map.gesture.maximumZoomLevel, 9)
- map.gesture.maximumZoomLevel = map.maximumZoomLevel
- compare(pinchMaximumZoomLevelSpy.count, 2)
- compare(map.gesture.maximumZoomLevel, map.maximumZoomLevel)
-
- clear_data()
- map.gesture.minimumZoomLevel = 5 // ok
- map.gesture.maximumZoomLevel = 9 // ok
- map.gesture.minimumZoomLevel = 10 // bigger than max
- map.gesture.maximumZoomLevel = 4 // smaller than min
- compare (pinchMaximumZoomLevelSpy.count, 1)
- compare (pinchMinimumZoomLevelSpy.count, 1)
- compare(map.gesture.maximumZoomLevel, 9)
- compare(map.gesture.minimumZoomLevel, 5)
- map.gesture.minimumZoomLevel = map.minimumZoomLevel
- map.gesture.maximumZoomLevel = map.maximumZoomLevel
- */
-
compare(map.gesture.maximumZoomLevelChange, 2)
map.gesture.maximumZoomLevelChange = 4
compare(pinchMaximumZoomLevelChangeSpy.count, 1)
@@ -234,58 +182,6 @@ Item {
compare(pinchMaximumZoomLevelChangeSpy.count, 2)
compare (map.gesture.maximumZoomLevelChange, 2)
- /*
- compare(map.gesture.minimumRotation, 0)
- map.gesture.minimumRotation = 10
- compare(pinchMinimumRotationSpy.count, 1)
- compare(map.gesture.minimumRotation, 10)
- map.gesture.minimumRotation = 10
- compare(pinchMinimumRotationSpy.count, 1)
- compare(map.gesture.minimumRotation, 10)
- map.gesture.minimumRotation = -1 // too small
- map.gesture.minimumRotation = 361 // too big
- compare(pinchMinimumRotationSpy.count, 1)
- compare(map.gesture.minimumRotation, 10)
- map.gesture.minimumRotation = 0
- compare(pinchMinimumRotationSpy.count, 2)
- compare(map.gesture.minimumRotation, 0)
-
- compare(map.gesture.maximumRotation, 45)
- map.gesture.maximumRotation = 55
- compare(pinchMaximumRotationSpy.count,1)
- compare(map.gesture.maximumRotation, 55)
- map.gesture.maximumRotation = 55
- compare(pinchMaximumRotationSpy.count,1)
- compare(map.gesture.maximumRotation, 55)
- map.gesture.maximumRotation = -1 // too small
- map.gesture.maximumRotation = 362 // too big
- compare(pinchMaximumRotationSpy.count,1)
- compare(map.gesture.maximumRotation, 55)
- map.gesture.maximumRotation = 45
- compare(pinchMaximumRotationSpy.count,2)
- compare(map.gesture.maximumRotation, 45)
- */
-
- compare(map.gesture.rotationFactor, 1)
- map.gesture.rotationFactor = 2
- compare(pinchRotationFactorSpy.count, 1)
- compare(map.gesture.rotationFactor, 2)
- map.gesture.rotationFactor = 2
- compare(pinchRotationFactorSpy.count, 1)
- compare(map.gesture.rotationFactor, 2)
- map.gesture.rotationFactor = -1 // too small
- map.gesture.rotationFactor = 6 // too big
- compare(pinchRotationFactorSpy.count, 1)
- compare(map.gesture.rotationFactor, 2)
- map.gesture.rotationFactor = 1
- compare(pinchRotationFactorSpy.count, 2)
- compare(map.gesture.rotationFactor, 1)
- /*
- compare(map.gesture.maximumTilt, 90)
- compare(map.gesture.minimumTilt, 0)
- compare(map.gesture.maximumTiltChange, 20)
- */
-
compare(map.gesture.flickDeceleration, 2500)
map.gesture.flickDeceleration = 2600
compare(flickDecelerationSpy.count, 1)
@@ -301,109 +197,6 @@ Item {
compare(map.gesture.flickDeceleration, 10000) // clipped to max
}
- function test_b_pinch_rotation() {
- map.gesture.activeGestures = MapGestureArea.RotationGesture
- map.gesture.rotationFactor = 1.0
- map.zoomLevel = 8
- compare(map.zoomLevel, 8)
- map.center.latitude = 10
- map.center.longitude = 11
- clear_data()
- compare(map.bearing, 0)
- // 1. basic ccw rotation
- pinchGenerator.pinch(
- Qt.point(100, 0), // point 1 from
- Qt.point(50, 0), // point 1 to
- Qt.point(0, 100), // point 2 from
- Qt.point(50, 100)); // point 2 to
- tryCompare(pinchStartedSpy, "count", 1);
- wait(50);
- compare(pinchActiveSpy.count,1) // check that pinch is active
- compare(map.gesture.isPinchActive, true)
- wait(200);
- verify(pinchUpdatedSpy.count >= 5); // verify 'sane' number of updates received
- tryCompare(pinchFinishedSpy, "count", 1);
- compare(pinchActiveSpy.count,2)
- compare(map.gesture.isPinchActive, false)
- compare(map.zoomLevel, 8) // mustn't change
- compare(mapBearingSpy.count, pinchUpdatedSpy.count)
- verify(map.bearing > 20 && map.bearing < 30) // roughly right
- var ccw_basic = map.bearing
- // 2. reverse the previous rotation (cw same amount)
- clear_data()
- pinchGenerator.pinch(
- Qt.point(50, 0),
- Qt.point(100, 0),
- Qt.point(50, 100),
- Qt.point(0, 100));
- tryCompare(pinchStartedSpy, "count", 1);
- wait(250);
- verify(pinchUpdatedSpy.count >= 5); // verify 'sane' number of updates received
- tryCompare(pinchFinishedSpy, "count", 1);
- compare(pinchActiveSpy.count,2)
- compare(map.gesture.isPinchActive, false)
- compare(map.zoomLevel, 8) // mustn't change
- compare(mapBearingSpy.count, pinchUpdatedSpy.count)
- verify(map.bearing < 2 || map.bearing > 358) // roughly right
- // 3. set bearing manually on map and repeat the basic ccw rotation
- clear_data()
- map.bearing = 5
- compare(mapBearingSpy.count, 1)
- compare(map.bearing, 5)
- pinchGenerator.pinch(Qt.point(100, 0),Qt.point(50, 0),Qt.point(0, 100),Qt.point(50, 100));
- tryCompare(pinchFinishedSpy, "count", 1);
- compare(map.bearing, ccw_basic + 5)
- map.bearing = 0
- // 4. manually setting bearing values
- clear_data()
- map.bearing = -1.5
- compare(mapBearingSpy.count, 1)
- compare(map.bearing, 358.5)
- map.bearing = -357.2
- compare(map.bearing, 2.8)
- map.bearing = 702.5
- compare(map.bearing, 343.5)
- map.bearing = -702.5
- compare(map.bearing, 16.5)
- map.bearing = 0
- // 5. rotation factor effects, repeat the basic ccw rotation
- map.gesture.rotationFactor = 2
- pinchGenerator.pinch(Qt.point(100, 0),Qt.point(50, 0),Qt.point(0, 100),Qt.point(50, 100));
- tryCompare(pinchFinishedSpy, "count", 1);
- verify (map.bearing > (ccw_basic * 2 - 5)) // roughly right, hence the '5'
- map.bearing = 0
- map.gesture.rotationFactor = 0.5
- pinchGenerator.pinch(Qt.point(100, 0),Qt.point(50, 0),Qt.point(0, 100),Qt.point(50, 100));
- tryCompare(pinchFinishedSpy, "count", 2);
- verify (map.bearing > (ccw_basic / 2 - 1) && map.bearing < (ccw_basic / 2 + 1)) // roughly right, hence the '1'
- map.gesture.rotationFactor = 1.0
- map.bearing = 0
- // 6. manually changing the bearing during pinch rotation
- clear_data()
- pinchGenerator.pinch(Qt.point(100, 0),Qt.point(50, 0),Qt.point(0, 100),Qt.point(50, 100));
- tryCompare(pinchStartedSpy, "count", 1);
-
- tryCompare(pinchActiveSpy, "count",1) // check that pinch is active
- compare(map.gesture.isPinchActive, true)
- map.bearing += 100 // this will get overwritten
- tryCompare(pinchFinishedSpy, "count", 1);
- compare(map.bearing, ccw_basic)
- // 7. test rotating past the '0' bearing
- clear_data()
- map.bearing = 350
- pinchGenerator.pinch(Qt.point(100, 0),Qt.point(50, 0),Qt.point(0, 100),Qt.point(50, 100));
- tryCompare(pinchFinishedSpy, "count", 1);
- compare(map.bearing, ccw_basic - 10)
- // 8. sanity check the biggest rotation factor
- clear_data()
- map.gesture.rotationFactor = 5
- compare(map.gesture.rotationFactor, 5)
- map.bearing = 0
- pinchGenerator.pinch(Qt.point(100, 0),Qt.point(50, 0),Qt.point(0, 100),Qt.point(50, 100)); //ccw
- tryCompare(pinchFinishedSpy, "count", 1);
- compare(map.bearing, ccw_basic * 5)
- }
-
function test_a_flick() {
clear_data()
var i=0
diff --git a/tests/auto/qgeocodereply/tst_qgeocodereply.cpp b/tests/auto/qgeocodereply/tst_qgeocodereply.cpp
index 3851077a..ffb15703 100644
--- a/tests/auto/qgeocodereply/tst_qgeocodereply.cpp
+++ b/tests/auto/qgeocodereply/tst_qgeocodereply.cpp
@@ -59,7 +59,7 @@ void tst_QGeoCodeReply::cleanupTestCase()
void tst_QGeoCodeReply::init()
{
qRegisterMetaType<QGeoCodeReply::Error>("Error");
- signalerror = new QSignalSpy(reply, SIGNAL(error(QGeoCodeReply::Error,const QString)));
+ signalerror = new QSignalSpy(reply, SIGNAL(error(QGeoCodeReply::Error,QString)));
signalfinished = new QSignalSpy(reply, SIGNAL(finished()));
}
diff --git a/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp b/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
index 86435448..bd45cfac 100644
--- a/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
+++ b/tests/auto/qgeopositioninfosource/testqgeopositioninfosource.cpp
@@ -332,7 +332,7 @@ void TestQGeoPositionInfoSource::lastKnownPosition()
m_source->setPreferredPositioningMethods(positioningMethod);
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
int time_out = 7000;
m_source->setUpdateInterval(time_out);
@@ -346,7 +346,7 @@ void TestQGeoPositionInfoSource::lastKnownPosition()
//simulated CI tests will quickly return -> real GPS tests take 2 minutes for satellite systems
//use a 5 min timeout
timer.setInterval(300000);
- connect(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)),
+ connect(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)),
&loop, SLOT(quit()));
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
timer.start();
@@ -429,7 +429,7 @@ void TestQGeoPositionInfoSource::minimumUpdateInterval()
void TestQGeoPositionInfoSource::startUpdates_testIntervals()
{
CHECK_SOURCE_VALID;
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(7000);
int interval = m_source->updateInterval();
@@ -457,7 +457,7 @@ void TestQGeoPositionInfoSource::startUpdates_testIntervalChangesWhileRunning()
CHECK_SOURCE_VALID;
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(0);
m_source->startUpdates();
@@ -505,7 +505,7 @@ void TestQGeoPositionInfoSource::startUpdates_testDefaultInterval()
{
CHECK_SOURCE_VALID;
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
m_source->startUpdates();
for (int i = 0; i < 3; i++) {
@@ -521,7 +521,7 @@ void TestQGeoPositionInfoSource::startUpdates_testZeroInterval()
{
CHECK_SOURCE_VALID;
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(0);
m_source->startUpdates();
@@ -536,7 +536,7 @@ void TestQGeoPositionInfoSource::startUpdates_moreThanOnce()
{
CHECK_SOURCE_VALID;
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(0);
m_source->startUpdates();
@@ -555,7 +555,7 @@ void TestQGeoPositionInfoSource::stopUpdates()
{
CHECK_SOURCE_VALID;
- QSignalSpy spy(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spy(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy timeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(7000);
m_source->startUpdates();
@@ -601,7 +601,7 @@ void TestQGeoPositionInfoSource::requestUpdate_validTimeout()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->requestUpdate(7000);
@@ -612,7 +612,7 @@ void TestQGeoPositionInfoSource::requestUpdate_validTimeout()
void TestQGeoPositionInfoSource::requestUpdate_defaultTimeout()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->requestUpdate(0);
@@ -637,7 +637,7 @@ void TestQGeoPositionInfoSource::requestUpdate_repeatedCalls()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->requestUpdate(7000);
@@ -653,7 +653,7 @@ void TestQGeoPositionInfoSource::requestUpdate_overlappingCalls()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->requestUpdate(7000);
@@ -667,7 +667,7 @@ void TestQGeoPositionInfoSource::requestUpdateAfterStartUpdates_ZeroInterval()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(0);
@@ -691,7 +691,7 @@ void TestQGeoPositionInfoSource::requestUpdateAfterStartUpdates_SmallInterval()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->setUpdateInterval(10000);
@@ -714,7 +714,7 @@ void TestQGeoPositionInfoSource::requestUpdateBeforeStartUpdates_ZeroInterval()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->requestUpdate(7000);
@@ -735,7 +735,7 @@ void TestQGeoPositionInfoSource::requestUpdateBeforeStartUpdates_ZeroInterval()
void TestQGeoPositionInfoSource::requestUpdateBeforeStartUpdates_SmallInterval()
{
CHECK_SOURCE_VALID;
- QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
+ QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)));
QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));
m_source->requestUpdate(7000);
@@ -770,11 +770,11 @@ void TestQGeoPositionInfoSource::removeSlotForPositionUpdated()
{
CHECK_SOURCE_VALID;
- bool i = connect(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo &)), this, SLOT(test_slot1()));
+ bool i = connect(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(test_slot1()));
QVERIFY(i == true);
- i = connect(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo &)), this, SLOT(test_slot2()));
+ i = connect(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(test_slot2()));
QVERIFY(i == true);
- i = disconnect(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo &)), this, SLOT(test_slot1()));
+ i = disconnect(m_source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(test_slot1()));
QVERIFY(i == true);
m_source->requestUpdate(7000);
diff --git a/tests/auto/qgeoroutereply/tst_qgeoroutereply.cpp b/tests/auto/qgeoroutereply/tst_qgeoroutereply.cpp
index 45d9bdd2..c0632cd3 100644
--- a/tests/auto/qgeoroutereply/tst_qgeoroutereply.cpp
+++ b/tests/auto/qgeoroutereply/tst_qgeoroutereply.cpp
@@ -69,7 +69,7 @@ void tst_QGeoRouteReply::cleanupTestCase()
void tst_QGeoRouteReply::init()
{
qRegisterMetaType<QGeoRouteReply::Error>("Error");
- signalerror = new QSignalSpy(reply, SIGNAL(error(QGeoRouteReply::Error, const QString)));
+ signalerror = new QSignalSpy(reply, SIGNAL(error(QGeoRouteReply::Error,QString)));
signalfinished = new QSignalSpy(reply, SIGNAL(finished()));
}
diff --git a/tests/auto/qgeosatelliteinfosource/testqgeosatelliteinfosource.cpp b/tests/auto/qgeosatelliteinfosource/testqgeosatelliteinfosource.cpp
index 4f00f72e..4585abc5 100644
--- a/tests/auto/qgeosatelliteinfosource/testqgeosatelliteinfosource.cpp
+++ b/tests/auto/qgeosatelliteinfosource/testqgeosatelliteinfosource.cpp
@@ -250,9 +250,9 @@ void TestQGeoSatelliteInfoSource::startUpdates_testIntervals()
{
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy timeout(m_source, SIGNAL(requestTimeout()));
m_source->setUpdateInterval(7000);
int interval = m_source->updateInterval();
@@ -279,9 +279,9 @@ void TestQGeoSatelliteInfoSource::startUpdates_testIntervalChangesWhileRunning()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy timeout(m_source, SIGNAL(requestTimeout()));
m_source->setUpdateInterval(0);
m_source->startUpdates();
@@ -334,9 +334,9 @@ void TestQGeoSatelliteInfoSource::startUpdates_testDefaultInterval()
{
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy timeout(m_source, SIGNAL(requestTimeout()));
m_source->startUpdates();
for (int i = 0; i < 3; i++) {
@@ -351,9 +351,9 @@ void TestQGeoSatelliteInfoSource::startUpdates_testZeroInterval()
{
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy timeout(m_source, SIGNAL(requestTimeout()));
m_source->setUpdateInterval(0);
@@ -370,9 +370,9 @@ void TestQGeoSatelliteInfoSource::startUpdates_moreThanOnce()
{
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
m_source->setUpdateInterval(0);
m_source->startUpdates();
@@ -391,9 +391,9 @@ void TestQGeoSatelliteInfoSource::stopUpdates()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
m_source->setUpdateInterval(10000);
m_source->startUpdates();
@@ -422,7 +422,7 @@ void TestQGeoSatelliteInfoSource::requestUpdate()
QFETCH(int, timeout);
QSignalSpy spy(m_source, SIGNAL(requestTimeout()));
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
m_source->requestUpdate(timeout);
// Geoclue may deliver update instantly if there is a satellite fix
QTRY_VERIFY_WITH_TIMEOUT(!spy.isEmpty() || !spyView.isEmpty(), 10);
@@ -440,9 +440,9 @@ void TestQGeoSatelliteInfoSource::requestUpdate_validTimeout()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyTimeout(m_source, SIGNAL(requestTimeout()));
m_source->requestUpdate(7000);
@@ -456,9 +456,9 @@ void TestQGeoSatelliteInfoSource::requestUpdate_defaultTimeout()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyTimeout(m_source, SIGNAL(requestTimeout()));
m_source->requestUpdate(0);
@@ -483,9 +483,9 @@ void TestQGeoSatelliteInfoSource::requestUpdate_repeatedCalls()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
m_source->requestUpdate(7000);
@@ -503,9 +503,9 @@ void TestQGeoSatelliteInfoSource::requestUpdate_overlappingCalls()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
m_source->requestUpdate(7000);
m_source->requestUpdate(7000);
@@ -518,9 +518,9 @@ void TestQGeoSatelliteInfoSource::requestUpdate_overlappingCallsWithTimeout()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyTimeout(m_source,
SIGNAL(requestTimeout()));
@@ -537,9 +537,9 @@ void TestQGeoSatelliteInfoSource::requestUpdateAfterStartUpdates_ZeroInterval()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyTimeout(m_source, SIGNAL(requestTimeout()));
m_source->setUpdateInterval(0);
@@ -567,9 +567,9 @@ void TestQGeoSatelliteInfoSource::requestUpdateAfterStartUpdates_SmallInterval()
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyTimeout(m_source, SIGNAL(requestTimeout()));
m_source->setUpdateInterval(10000);
m_source->requestUpdate(7000);
@@ -591,9 +591,9 @@ void TestQGeoSatelliteInfoSource::requestUpdateBeforeStartUpdates_ZeroInterval()
{
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy timeout(m_source, SIGNAL(requestTimeout()));
m_source->requestUpdate(7000);
@@ -616,9 +616,9 @@ void TestQGeoSatelliteInfoSource::requestUpdateBeforeStartUpdates_SmallInterval(
{
CHECK_SOURCE_VALID;
QSignalSpy spyView(m_source,
- SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy spyUse(m_source,
- SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)));
+ SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)));
QSignalSpy timeout(m_source, SIGNAL(requestTimeout()));
m_source->requestUpdate(7000);
@@ -656,11 +656,11 @@ void TestQGeoSatelliteInfoSource::removeSlotForSatellitesInUseUpdated()
{
CHECK_SOURCE_VALID;
- bool i = connect(m_source, SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)), this, SLOT(test_slot1()));
+ bool i = connect(m_source, SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)), this, SLOT(test_slot1()));
QVERIFY(i == true);
- i = connect(m_source, SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)), this, SLOT(test_slot2()));
+ i = connect(m_source, SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)), this, SLOT(test_slot2()));
QVERIFY(i == true);
- i = disconnect(m_source, SIGNAL(satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &)), this, SLOT(test_slot1()));
+ i = disconnect(m_source, SIGNAL(satellitesInUseUpdated(QList<QGeoSatelliteInfo>)), this, SLOT(test_slot1()));
QVERIFY(i == true);
m_source->requestUpdate(7000);
@@ -672,11 +672,11 @@ void TestQGeoSatelliteInfoSource::removeSlotForSatellitesInViewUpdated()
{
CHECK_SOURCE_VALID;
- bool i = connect(m_source, SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)), this, SLOT(test_slot1()));
+ bool i = connect(m_source, SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)), this, SLOT(test_slot1()));
QVERIFY(i == true);
- i = connect(m_source, SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)), this, SLOT(test_slot2()));
+ i = connect(m_source, SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)), this, SLOT(test_slot2()));
QVERIFY(i == true);
- i = disconnect(m_source, SIGNAL(satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &)), this, SLOT(test_slot1()));
+ i = disconnect(m_source, SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)), this, SLOT(test_slot1()));
QVERIFY(i == true);
m_source->requestUpdate(7000);
diff --git a/tests/auto/qmlinterface/data/TestAddress.qml b/tests/auto/qmlinterface/data/TestAddress.qml
index ef9a17a3..b3173734 100644
--- a/tests/auto/qmlinterface/data/TestAddress.qml
+++ b/tests/auto/qmlinterface/data/TestAddress.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
Address {
city: "Brisbane"
diff --git a/tests/auto/qmlinterface/data/TestCategory.qml b/tests/auto/qmlinterface/data/TestCategory.qml
index 95a9b616..1e9e4950 100644
--- a/tests/auto/qmlinterface/data/TestCategory.qml
+++ b/tests/auto/qmlinterface/data/TestCategory.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
Category {
name: "Test category"
diff --git a/tests/auto/qmlinterface/data/TestContactDetail.qml b/tests/auto/qmlinterface/data/TestContactDetail.qml
index 2575947d..1221a6e1 100644
--- a/tests/auto/qmlinterface/data/TestContactDetail.qml
+++ b/tests/auto/qmlinterface/data/TestContactDetail.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
ContactDetail {
label: "Test Contact Detail"
diff --git a/tests/auto/qmlinterface/data/TestIcon.qml b/tests/auto/qmlinterface/data/TestIcon.qml
index dd3b1391..e7902d5c 100644
--- a/tests/auto/qmlinterface/data/TestIcon.qml
+++ b/tests/auto/qmlinterface/data/TestIcon.qml
@@ -40,7 +40,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtLocation 5.0
+import QtLocation 5.3
Icon {
Component.onCompleted: {
diff --git a/tests/auto/qmlinterface/data/TestLocation.qml b/tests/auto/qmlinterface/data/TestLocation.qml
index f92bd51e..010fc9d0 100644
--- a/tests/auto/qmlinterface/data/TestLocation.qml
+++ b/tests/auto/qmlinterface/data/TestLocation.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
Location {
address: TestAddress { }
diff --git a/tests/auto/qmlinterface/data/TestPlace.qml b/tests/auto/qmlinterface/data/TestPlace.qml
index 90af9e15..d4691360 100644
--- a/tests/auto/qmlinterface/data/TestPlace.qml
+++ b/tests/auto/qmlinterface/data/TestPlace.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
Place {
name: "Test Place"
diff --git a/tests/auto/qmlinterface/data/TestPlaceAttribute.qml b/tests/auto/qmlinterface/data/TestPlaceAttribute.qml
index 2ba20a56..adbe987b 100644
--- a/tests/auto/qmlinterface/data/TestPlaceAttribute.qml
+++ b/tests/auto/qmlinterface/data/TestPlaceAttribute.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
PlaceAttribute {
label: "Test Attribute"
diff --git a/tests/auto/qmlinterface/data/TestRatings.qml b/tests/auto/qmlinterface/data/TestRatings.qml
index d793806d..53228de7 100644
--- a/tests/auto/qmlinterface/data/TestRatings.qml
+++ b/tests/auto/qmlinterface/data/TestRatings.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
Ratings {
average: 3.5
diff --git a/tests/auto/qmlinterface/data/TestSupplier.qml b/tests/auto/qmlinterface/data/TestSupplier.qml
index 9f1d732a..7af33d1d 100644
--- a/tests/auto/qmlinterface/data/TestSupplier.qml
+++ b/tests/auto/qmlinterface/data/TestSupplier.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
Supplier {
name: "Test supplier"
diff --git a/tests/auto/qmlinterface/data/TestUser.qml b/tests/auto/qmlinterface/data/TestUser.qml
index 77428540..63d1f41a 100644
--- a/tests/auto/qmlinterface/data/TestUser.qml
+++ b/tests/auto/qmlinterface/data/TestUser.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtLocation 5.0
+import QtLocation 5.3
User {
name: "Test User"
diff --git a/tests/auto/qplace/tst_qplace.cpp b/tests/auto/qplace/tst_qplace.cpp
index ed171e35..1b5ea786 100644
--- a/tests/auto/qplace/tst_qplace.cpp
+++ b/tests/auto/qplace/tst_qplace.cpp
@@ -682,7 +682,7 @@ void tst_Place::isEmptyTest()
place.removeContactDetails(QLatin1String("phone"));
QVERIFY(place.isEmpty());
- // visiblity
+ // visibility
place.setVisibility(QLocation::DeviceVisibility);
QVERIFY(!place.isEmpty());
place.setVisibility(QLocation::UnspecifiedVisibility);
diff --git a/tests/plugins/declarativetestplugin/declarativetestplugin.pro b/tests/plugins/declarativetestplugin/declarativetestplugin.pro
index ce4fa738..c4c82e2e 100644
--- a/tests/plugins/declarativetestplugin/declarativetestplugin.pro
+++ b/tests/plugins/declarativetestplugin/declarativetestplugin.pro
@@ -15,5 +15,11 @@ SOURCES += locationtest.cpp \
qdeclarativepinchgenerator.cpp \
qdeclarativelocationtestmodel.cpp
+IMPORT_FILES = \
+ qmldir
+
load(qml_plugin)
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+# must be after load(qml_plugin)
+include(../imports.pri)
diff --git a/tests/plugins/imports.pri b/tests/plugins/imports.pri
new file mode 100644
index 00000000..e7ff1d42
--- /dev/null
+++ b/tests/plugins/imports.pri
@@ -0,0 +1,8 @@
+!contains(DESTDIR, $$[QT_INSTALL_QML]/$$TARGETPATH) {
+ copyimportfiles.input = IMPORT_FILES
+ copyimportfiles.output = $$DESTDIR/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
+ copyimportfiles.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ copyimportfiles.CONFIG += no_link_no_clean
+ copyimportfiles.variable_out = PRE_TARGETDEPS
+ QMAKE_EXTRA_COMPILERS += copyimportfiles
+}