summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-10-22 14:37:37 +0200
committerAlex Blasche <alexander.blasche@digia.com>2013-10-22 14:38:06 +0200
commit71dffcd319c2641e1022bf857f9c72671cb1446a (patch)
tree84a7685d0c174a6c461c06aed60a2961a7d3f8fb /src
parent2867f1efc989478667ea7ae56ff91cd991d74121 (diff)
parent654b01af941ec620ca8a9b98be8542dda862d4a8 (diff)
downloadqtlocation-71dffcd319c2641e1022bf857f9c72671cb1446a.tar.gz
Merge branch 'stable' into dev
Conflicts: src/imports/location/qdeclarativegeomap.cpp src/imports/location/qdeclarativegeoroute.cpp src/imports/location/qdeclarativegeoroutemodel.cpp src/imports/location/qdeclarativegeoroutesegment.cpp src/imports/location/qdeclarativepolygonmapitem.cpp src/imports/location/qdeclarativepolylinemapitem.cpp src/imports/positioning/positioning.cpp Change-Id: Ieaa5f567d2144d0267e7eef5bd75bde7e0079fbe
Diffstat (limited to 'src')
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativecategory.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativecontactdetail.cpp16
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace.cpp4
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp4
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceeditorialmodel.cpp4
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceimagemodel.cpp4
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceuser.cpp8
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeratings.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp10
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp4
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesupplier.cpp2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp6
-rw-r--r--src/imports/location/qdeclarativecirclemapitem.cpp2
-rw-r--r--src/imports/location/qdeclarativegeocodemodel.cpp30
-rw-r--r--src/imports/location/qdeclarativegeomaneuver.cpp2
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp42
-rw-r--r--src/imports/location/qdeclarativegeomapgesturearea.cpp118
-rw-r--r--src/imports/location/qdeclarativegeomapgesturearea_p.h3
-rw-r--r--src/imports/location/qdeclarativegeomapitemview.cpp8
-rw-r--r--src/imports/location/qdeclarativegeomapmousearea.cpp34
-rw-r--r--src/imports/location/qdeclarativegeomapmouseevent.cpp18
-rw-r--r--src/imports/location/qdeclarativegeomapquickitem.cpp2
-rw-r--r--src/imports/location/qdeclarativegeomaptype.cpp2
-rw-r--r--src/imports/location/qdeclarativegeoroute.cpp14
-rw-r--r--src/imports/location/qdeclarativegeoroutemodel.cpp50
-rw-r--r--src/imports/location/qdeclarativegeoroutesegment.cpp12
-rw-r--r--src/imports/location/qdeclarativegeoserviceprovider.cpp4
-rw-r--r--src/imports/location/qdeclarativepolygonmapitem.cpp4
-rw-r--r--src/imports/location/qdeclarativepolylinemapitem.cpp4
-rw-r--r--src/imports/location/qdeclarativerectanglemapitem.cpp2
-rw-r--r--src/imports/location/qdeclarativeroutemapitem.cpp2
-rw-r--r--src/imports/positioning/locationsingleton.cpp5
-rw-r--r--src/imports/positioning/plugins.qmltypes36
-rw-r--r--src/imports/positioning/positioning.cpp36
-rw-r--r--src/imports/positioning/qdeclarativecoordinate.cpp6
-rw-r--r--src/imports/positioning/qdeclarativegeocircle.cpp6
-rw-r--r--src/imports/positioning/qdeclarativegeorectangle.cpp6
-rw-r--r--src/imports/positioning/qdeclarativegeoshape.cpp6
-rw-r--r--src/imports/positioning/qdeclarativeposition.cpp4
-rw-r--r--src/imports/positioning/qdeclarativepositionsource.cpp50
-rw-r--r--src/imports/positioning/qdeclarativepositionsource_p.h6
-rw-r--r--src/location/doc/snippets/declarative/declarative-location.qml2
-rw-r--r--src/location/doc/snippets/declarative/maps.qml2
-rw-r--r--src/location/doc/snippets/declarative/places.qml2
-rw-r--r--src/location/doc/snippets/declarative/places_loader.qml2
-rw-r--r--src/location/doc/src/examples/declarative-mapviewer.qdoc20
-rw-r--r--src/location/doc/src/examples/declarative-places.qdoc4
-rw-r--r--src/location/doc/src/maps.qdoc62
-rw-r--r--src/location/doc/src/qml-maps.qdoc6
-rw-r--r--src/location/doc/src/qtlocation-qml.qdoc6
-rw-r--r--src/location/maps/qgeocameratiles.cpp74
-rw-r--r--src/plugins/position/geoclue/qgeocluemaster.cpp7
-rw-r--r--src/plugins/position/geoclue/qgeocluemaster.h1
-rw-r--r--src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp162
-rw-r--r--src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h10
-rw-r--r--src/positioning/doc/snippets/doc_src_qtpositioning.qml2
-rw-r--r--src/positioning/doc/src/cpp-qml-positioning.qdoc2
-rw-r--r--src/positioning/doc/src/examples/declarative-flickr.qdoc2
-rw-r--r--src/positioning/doc/src/qtpositioning-qml.qdoc4
-rw-r--r--src/positioning/doc/src/qtpositioning.qdoc8
-rw-r--r--src/positioning/qdeclarativegeoaddress.cpp8
-rw-r--r--src/positioning/qdeclarativegeolocation.cpp4
-rw-r--r--src/positioning/qgeoaddress.cpp2
-rw-r--r--src/positioning/qgeoareamonitorinfo.cpp1
-rw-r--r--src/positioning/qgeoareamonitorsource.cpp2
-rw-r--r--src/positioning/qgeocircle.cpp2
-rw-r--r--src/positioning/qgeocoordinate.cpp2
-rw-r--r--src/positioning/qgeolocation.cpp2
-rw-r--r--src/positioning/qgeopositioninfo.cpp6
-rw-r--r--src/positioning/qgeopositioninfosource.cpp6
-rw-r--r--src/positioning/qgeopositioninfosource.h6
-rw-r--r--src/positioning/qgeopositioninfosourcefactory.cpp2
-rw-r--r--src/positioning/qgeorectangle.cpp2
-rw-r--r--src/positioning/qgeosatelliteinfo.cpp2
-rw-r--r--src/positioning/qgeosatelliteinfosource.cpp2
-rw-r--r--src/positioning/qgeoshape.cpp2
-rw-r--r--src/positioning/qnmeapositioninfosource.cpp2
79 files changed, 570 insertions, 445 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativecategory.cpp b/src/imports/location/declarativeplaces/qdeclarativecategory.cpp
index 8d960771..c08694bc 100644
--- a/src/imports/location/declarativeplaces/qdeclarativecategory.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativecategory.cpp
@@ -54,7 +54,7 @@ QT_USE_NAMESPACE
/*!
\qmltype Category
\instantiates QDeclarativeCategory
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
diff --git a/src/imports/location/declarativeplaces/qdeclarativecontactdetail.cpp b/src/imports/location/declarativeplaces/qdeclarativecontactdetail.cpp
index 4a6624a5..6ea87435 100644
--- a/src/imports/location/declarativeplaces/qdeclarativecontactdetail.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativecontactdetail.cpp
@@ -44,17 +44,17 @@
/*!
\qmltype ContactDetails
\instantiates QDeclarativeContactDetails
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
\brief The ContactDetails type holds contact details for a \l Place.
- The ContactDetails type is a map of \l {QtLocation5::ContactDetail}{ContactDetail} objects.
+ The ContactDetails type is a map of \l {QtLocation::ContactDetail}{ContactDetail} objects.
To access contact details in the map use the \l keys() method to get the list of keys stored in
the map and then use the \c {[]} operator to access the
- \l {QtLocation5::ContactDetail}{ContactDetail} items.
+ \l {QtLocation::ContactDetail}{ContactDetail} items.
The following keys are defined in the API. \l Plugin implementations are free to define
additional keys.
@@ -72,7 +72,7 @@
\section1 Examples
- The following example shows how to access all \l {QtLocation5::ContactDetail}{ContactDetails}
+ The following example shows how to access all \l {QtLocation::ContactDetail}{ContactDetails}
and print them to the console:
\snippet declarative/places.qml QtLocation import
@@ -122,7 +122,7 @@ QVariant QDeclarativeContactDetails::updateValue(const QString &, const QVariant
/*!
\qmltype ContactDetail
\instantiates QDeclarativeContactDetail
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
@@ -161,7 +161,7 @@ QDeclarativeContactDetail::~QDeclarativeContactDetail()
}
/*!
- \qmlproperty QPlaceContactDetail QtLocation5::ContactDetail::contactDetail
+ \qmlproperty QPlaceContactDetail QtLocation::ContactDetail::contactDetail
For details on how to use this property to interface between C++ and QML see
"\l {location-cpp-qml.html#contact_detail} {Interfaces between C++ and QML Code}".
@@ -183,7 +183,7 @@ QPlaceContactDetail QDeclarativeContactDetail::contactDetail() const
}
/*!
- \qmlproperty string QtLocation5::ContactDetail::label
+ \qmlproperty string QtLocation::ContactDetail::label
This property holds a label describing the contact detail.
@@ -205,7 +205,7 @@ void QDeclarativeContactDetail::setLabel(const QString &label)
}
/*!
- \qmlproperty string QtLocation5::ContactDetail::value
+ \qmlproperty string QtLocation::ContactDetail::value
This property holds the value of the contact detail which may be a phone number, an email
address, a website url and so on.
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
index 208d955f..49e61769 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
@@ -61,7 +61,7 @@ QT_USE_NAMESPACE
/*!
\qmltype Place
\instantiates QDeclarativePlace
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
@@ -441,7 +441,7 @@ QPlace QDeclarativePlace::place()
}
/*!
- \qmlproperty QtPositioning5::Location Place::location
+ \qmlproperty QtPositioning::Location Place::location
This property holds the location of the place which can be used to retrieve the coordinate,
address and the bounding box.
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp
index fc3bb15c..0edd0d1c 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp
@@ -44,7 +44,7 @@
/*!
\qmltype ExtendedAttributes
\instantiates QQmlPropertyMap
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
@@ -122,7 +122,7 @@
/*!
\qmltype PlaceAttribute
\instantiates QDeclarativePlaceAttribute
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceeditorialmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceeditorialmodel.cpp
index 7913cef0..e2dbcdc5 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceeditorialmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceeditorialmodel.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype EditorialModel
\instantiates QDeclarativePlaceEditorialModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-models
\since Qt Location 5.0
@@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
\li The supplier of the editorial.
\row
\li user
- \li \l {QtLocation5::User}{User}
+ \li \l {QtLocation::User}{User}
\li The user who contributed the editorial.
\row
\li attribution
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp
index 3a93ae11..a2906916 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceicon.cpp
@@ -52,7 +52,7 @@ QT_USE_NAMESPACE
/*!
\qmltype Icon
\instantiates QDeclarativePlaceIcon
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceimagemodel.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceimagemodel.cpp
index 597bed89..5505ef53 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceimagemodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceimagemodel.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype ImageModel
\instantiates QDeclarativePlaceImageModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-models
\since Qt Location 5.0
@@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
\li The supplier of the image.
\row
\li user
- \li \l {QtLocation5::User}{User}
+ \li \l {QtLocation::User}{User}
\li The user who contributed the image.
\row
\li attribution
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceuser.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceuser.cpp
index f66a53e7..dc1b61e4 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceuser.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceuser.cpp
@@ -46,7 +46,7 @@ QT_USE_NAMESPACE
/*!
\qmltype User
\instantiates QDeclarativePlaceUser
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
@@ -80,7 +80,7 @@ QDeclarativePlaceUser::QDeclarativePlaceUser(const QPlaceUser &user,
QDeclarativePlaceUser::~QDeclarativePlaceUser() {}
/*!
- \qmlproperty QPlaceUser QtLocation5::User::user
+ \qmlproperty QPlaceUser QtLocation::User::user
For details on how to use this property to interface between C++ and QML see
"\l {location-cpp-qml.html#placeuser} {Interfaces between C++ and QML Code}".
@@ -103,7 +103,7 @@ QPlaceUser QDeclarativePlaceUser::user() const
}
/*!
- \qmlproperty string QtLocation5::User::userId
+ \qmlproperty string QtLocation::User::userId
This property holds the unique identifier of the user.
*/
@@ -123,7 +123,7 @@ QString QDeclarativePlaceUser::userId() const
}
/*!
- \qmlproperty string QtLocation5::User::name
+ \qmlproperty string QtLocation::User::name
This property holds the name of a user.
*/
diff --git a/src/imports/location/declarativeplaces/qdeclarativeratings.cpp b/src/imports/location/declarativeplaces/qdeclarativeratings.cpp
index f27b32cf..7db66787 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeratings.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeratings.cpp
@@ -46,7 +46,7 @@ QT_USE_NAMESPACE
/*!
\qmltype Ratings
\instantiates QDeclarativeRatings
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
diff --git a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
index 98a45439..113fbde7 100644
--- a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype ReviewModel
\instantiates QDeclarativeReviewModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-models
\since Qt Location 5.0
@@ -105,7 +105,7 @@ QT_BEGIN_NAMESPACE
\li The supplier of the review.
\row
\li user
- \li \l {QtLocation5::User}{User}
+ \li \l {QtLocation::User}{User}
\li The user who contributed the review.
\row
\li attribution
@@ -115,19 +115,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty Place QtLocation5::ReviewModel::place
+ \qmlproperty Place QtLocation::ReviewModel::place
This property holds the Place that the reviews are for.
*/
/*!
- \qmlproperty int QtLocation5::ReviewModel::batchSize
+ \qmlproperty int QtLocation::ReviewModel::batchSize
This property holds the batch size to use when fetching more reviews.
*/
/*!
- \qmlproperty int QtLocation5::ReviewModel::totalCount
+ \qmlproperty int QtLocation::ReviewModel::totalCount
This property holds the total number of reviews for the place.
*/
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
index 5d9559cb..d9492ca2 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
@@ -58,7 +58,7 @@ QT_USE_NAMESPACE
/*!
\qmltype PlaceSearchModel
\instantiates QDeclarativeSearchResultModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-models
\since Qt Location 5.0
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp
index f190cc4f..cfff8d2e 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchsuggestionmodel.cpp
@@ -53,7 +53,7 @@ QT_USE_NAMESPACE
/*!
\qmltype PlaceSearchSuggestionModel
\instantiates QDeclarativeSearchSuggestionModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-models
\since Qt Location 5.0
@@ -214,7 +214,7 @@ QT_USE_NAMESPACE
/*!
- \qmlmethod string QtLocation5::PlaceSearchSuggestionModel::errorString() const
+ \qmlmethod string QtLocation::PlaceSearchSuggestionModel::errorString() const
This read-only property holds the textual presentation of latest search suggestion model error.
If no error has occurred, or if the model was cleared, an empty string is returned.
diff --git a/src/imports/location/declarativeplaces/qdeclarativesupplier.cpp b/src/imports/location/declarativeplaces/qdeclarativesupplier.cpp
index 19487cdb..55ceda86 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesupplier.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesupplier.cpp
@@ -48,7 +48,7 @@ QT_USE_NAMESPACE
/*!
\qmltype Supplier
\instantiates QDeclarativeSupplier
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-data
\since Qt Location 5.0
diff --git a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
index dd0a7fea..38a73f2e 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
@@ -54,7 +54,7 @@ QT_USE_NAMESPACE
/*!
\qmltype CategoryModel
\instantiates QDeclarativeSupportedCategoriesModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-places
\ingroup qml-QtLocation5-places-models
\since Qt Location 5.0
@@ -108,14 +108,14 @@ QT_USE_NAMESPACE
*/
/*!
- \qmlmethod string QtLocation5::CategoryModel::data(ModelIndex index, int role)
+ \qmlmethod string QtLocation::CategoryModel::data(ModelIndex index, int role)
\internal
This method retrieves the the model's data per \a index and \a role.
*/
/*!
- \qmlmethod string QtLocation5::CategoryModel::errorString() const
+ \qmlmethod string QtLocation::CategoryModel::errorString() const
This read-only property holds the textual presentation of latest category model error.
If no error has occurred, an empty string is returned.
diff --git a/src/imports/location/qdeclarativecirclemapitem.cpp b/src/imports/location/qdeclarativecirclemapitem.cpp
index eb9d1272..2029a023 100644
--- a/src/imports/location/qdeclarativecirclemapitem.cpp
+++ b/src/imports/location/qdeclarativecirclemapitem.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapCircle
\instantiates QDeclarativeCircleMapItem
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp
index e169e5a6..797f7ee8 100644
--- a/src/imports/location/qdeclarativegeocodemodel.cpp
+++ b/src/imports/location/qdeclarativegeocodemodel.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype GeocodeModel
\instantiates QDeclarativeGeocodeModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-geocoding
\since Qt Location 5.0
@@ -133,7 +133,7 @@ void QDeclarativeGeocodeModel::componentComplete()
}
/*!
- \qmlmethod QtLocation5::GeocodeModel::update()
+ \qmlmethod QtLocation::GeocodeModel::update()
Instructs the GeocodeModel to update its data. This is most useful
when \l autoUpdate is disabled, to force a refresh when the query
@@ -297,7 +297,7 @@ void QDeclarativeGeocodeModel::pluginReady()
}
/*!
- \qmlproperty Plugin QtLocation5::GeocodeModel::plugin
+ \qmlproperty Plugin QtLocation::GeocodeModel::plugin
This property holds the plugin that provides the actual geocoding service.
Note that all plugins do not necessarily provide geocoding (could for example provide
@@ -331,7 +331,7 @@ void QDeclarativeGeocodeModel::setBounds(const QVariant &boundingArea)
}
/*!
- \qmlproperty geoshape QtLocation5::GeocodeModel::bounds
+ \qmlproperty geoshape QtLocation::GeocodeModel::bounds
This property holds the bounding area used to limit the results to those
within the area. This is particularly useful if query is only partially filled out,
@@ -391,7 +391,7 @@ void QDeclarativeGeocodeModel::geocodeError(QGeoCodeReply *reply,
}
/*!
- \qmlproperty enumeration QtLocation5::GeocodeModel::status
+ \qmlproperty enumeration QtLocation::GeocodeModel::status
This read-only property holds the current status of the model.
@@ -417,7 +417,7 @@ void QDeclarativeGeocodeModel::setStatus(QDeclarativeGeocodeModel::Status status
}
/*!
- \qmlproperty enumeration QtLocation5::GeocodeModel::error
+ \qmlproperty enumeration QtLocation::GeocodeModel::error
This read-only property holds the latest error value of the geocoding request.
@@ -446,7 +446,7 @@ void QDeclarativeGeocodeModel::setError(GeocodeError error)
}
/*!
- \qmlproperty string QtLocation5::GeocodeModel::errorString
+ \qmlproperty string QtLocation::GeocodeModel::errorString
This read-only property holds the textual presentation of latest geocoding error.
If no error has occurred or the model has been reset, an empty string is returned.
@@ -484,7 +484,7 @@ void QDeclarativeGeocodeModel::setLocations(const QList<QGeoLocation> &locations
}
/*!
- \qmlproperty int QtLocation5::GeocodeModel::count
+ \qmlproperty int QtLocation::GeocodeModel::count
This property holds how many locations the model currently has.
Amongst other uses, you can use this value when accessing locations
@@ -497,7 +497,7 @@ int QDeclarativeGeocodeModel::count() const
}
/*!
- \qmlmethod Location QtLocation5::GeocodeModel::get(int)
+ \qmlmethod Location QtLocation::GeocodeModel::get(int)
Returns the Location at given index. Use \l count property to check the
amount of locations available. The locations are indexed from zero, so the accessible range
@@ -516,7 +516,7 @@ QDeclarativeGeoLocation *QDeclarativeGeocodeModel::get(int index)
}
/*!
- \qmlproperty int QtLocation5::GeocodeModel::limit
+ \qmlproperty int QtLocation::GeocodeModel::limit
This property holds the maximum number of results. The limit and \l offset values are only
applicable with free string geocoding (that is they are not considered when using addresses
@@ -543,7 +543,7 @@ void QDeclarativeGeocodeModel::setLimit(int limit)
}
/*!
- \qmlproperty int QtLocation5::GeocodeModel::offset
+ \qmlproperty int QtLocation::GeocodeModel::offset
This property tells not to return the first 'offset' number of the results. The \l limit and
offset values are only applicable with free string geocoding (that is they are not considered
@@ -569,7 +569,7 @@ void QDeclarativeGeocodeModel::setOffset(int offset)
}
/*!
- \qmlmethod QtLocation5::GeocodeModel::reset()
+ \qmlmethod QtLocation::GeocodeModel::reset()
Resets the model. All location data is cleared, any outstanding requests
are aborted and possible errors are cleared. Model status will be set
@@ -592,7 +592,7 @@ void QDeclarativeGeocodeModel::reset()
}
/*!
- \qmlmethod QtLocation5::GeocodeModel::cancel()
+ \qmlmethod QtLocation::GeocodeModel::cancel()
Cancels any outstanding requests and clears errors. Model status will be set to either
GeocodeModel.Null or GeocodeModel.Ready.
@@ -606,7 +606,7 @@ void QDeclarativeGeocodeModel::cancel()
}
/*!
- \qmlproperty QVariant QtLocation5::GeocodeModel::query
+ \qmlproperty QVariant QtLocation::GeocodeModel::query
This property holds the data of the geocoding request.
The property accepts three types of queries which determine both the data and
@@ -676,7 +676,7 @@ void QDeclarativeGeocodeModel::setQuery(const QVariant &query)
}
/*!
- \qmlproperty bool QtLocation5::GeocodeModel::autoUpdate
+ \qmlproperty bool QtLocation::GeocodeModel::autoUpdate
This property controls whether the Model automatically updates in response
to changes in its attached query. The default value of this property
diff --git a/src/imports/location/qdeclarativegeomaneuver.cpp b/src/imports/location/qdeclarativegeomaneuver.cpp
index 09edf377..ef9fde7b 100644
--- a/src/imports/location/qdeclarativegeomaneuver.cpp
+++ b/src/imports/location/qdeclarativegeomaneuver.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype RouteManeuver
\instantiates QDeclarativeGeoManeuver
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-routing
\since Qt Location 5.0
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index b276989e..9d98c187 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Map
\instantiates QDeclarativeGeoMap
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
@@ -361,7 +361,7 @@ bool QDeclarativeGeoMap::mouseEvent(QMouseEvent *event)
/*!
- \qmlproperty MapGestureArea QtLocation5::Map::gesture
+ \qmlproperty MapGestureArea QtLocation::Map::gesture
Contains the MapGestureArea created with the Map. This covers pan, flick and pinch gestures.
Use \c{gesture.enabled: true} to enable basic gestures, or see \l{MapGestureArea} for
@@ -442,7 +442,7 @@ QSGNode *QDeclarativeGeoMap::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
/*!
- \qmlproperty Plugin QtLocation5::Map::plugin
+ \qmlproperty Plugin QtLocation::Map::plugin
This property holds the plugin which provides the mapping functionality.
@@ -569,7 +569,7 @@ QDeclarativeGeoServiceProvider *QDeclarativeGeoMap::plugin() const
}
/*!
- \qmlproperty real QtLocation5::Map::minimumZoomLevel
+ \qmlproperty real QtLocation::Map::minimumZoomLevel
This property holds the minimum valid zoom level for the map.
@@ -586,7 +586,7 @@ qreal QDeclarativeGeoMap::minimumZoomLevel() const
}
/*!
-\qmlproperty real QtLocation5::Map::maximumZoomLevel
+\qmlproperty real QtLocation::Map::maximumZoomLevel
This property holds the maximum valid zoom level for the map.
@@ -678,7 +678,7 @@ void QDeclarativeGeoMap::setTilt(qreal tilt)
}
/*!
- \qmlproperty real QtLocation5::Map::zoomLevel
+ \qmlproperty real QtLocation::Map::zoomLevel
This property holds the zoom level for the map.
@@ -713,7 +713,7 @@ qreal QDeclarativeGeoMap::zoomLevel() const
}
/*!
-\qmlproperty coordinate QtLocation5::Map::center
+\qmlproperty coordinate QtLocation::Map::center
This property holds the coordinate which occupies the center of the
mapping viewport.
@@ -777,7 +777,7 @@ void QDeclarativeGeoMap::mapBearingChanged(qreal bearing)
}
/*!
- \qmlproperty list<MapType> QtLocation5::Map::supportedMapTypes
+ \qmlproperty list<MapType> QtLocation::Map::supportedMapTypes
This read-only property holds the set of \l{MapType}{map types} supported by this map.
@@ -789,7 +789,7 @@ QQmlListProperty<QDeclarativeGeoMapType> QDeclarativeGeoMap::supportedMapTypes()
}
/*!
- \qmlmethod QtLocation5::Map::toCoordinate(QPointF screenPosition)
+ \qmlmethod QtLocation::Map::toCoordinate(QPointF screenPosition)
Returns the coordinate which corresponds to the screen position
\a screenPosition.
@@ -807,7 +807,7 @@ QGeoCoordinate QDeclarativeGeoMap::toCoordinate(const QPointF &screenPosition) c
}
/*!
-\qmlmethod QtLocation5::Map::toScreenPosition(coordinate coordinate)
+\qmlmethod QtLocation::Map::toScreenPosition(coordinate coordinate)
Returns the screen position which corresponds to the coordinate
\a coordinate.
@@ -825,7 +825,7 @@ QPointF QDeclarativeGeoMap::toScreenPosition(const QGeoCoordinate &coordinate) c
}
/*!
- \qmlmethod void QtLocation5::Map::pan(int dx, int dy)
+ \qmlmethod void QtLocation::Map::pan(int dx, int dy)
Starts panning the map by \a dx pixels along the x-axis and
by \a dy pixels along the y-axis.
@@ -844,7 +844,7 @@ void QDeclarativeGeoMap::pan(int dx, int dy)
/*!
- \qmlmethod void QtLocation5::Map::cameraStopped()
+ \qmlmethod void QtLocation::Map::cameraStopped()
Optional hint that allows the map to prefetch during this idle period
*/
@@ -866,8 +866,7 @@ void QDeclarativeGeoMap::touchEvent(QTouchEvent *event)
}
QLOC_TRACE0;
event->accept();
- if (!gestureArea_->touchEvent(event))
- event->ignore();
+ gestureArea_->touchEvent(event);
}
/*!
@@ -885,7 +884,6 @@ void QDeclarativeGeoMap::wheelEvent(QWheelEvent *event)
*/
bool QDeclarativeGeoMap::childMouseEventFilter(QQuickItem *item, QEvent *event)
{
- Q_UNUSED(item);
QLOC_TRACE0;
switch (event->type()) {
case QEvent::MouseButtonPress:
@@ -902,7 +900,7 @@ bool QDeclarativeGeoMap::childMouseEventFilter(QQuickItem *item, QEvent *event)
}
/*!
- \qmlmethod QtLocation5::Map::addMapItem(MapItem item)
+ \qmlmethod QtLocation::Map::addMapItem(MapItem item)
Adds the given \a item to the Map (for example MapQuickItem, MapCircle). If the object
already is on the Map, it will not be added again.
@@ -934,7 +932,7 @@ void QDeclarativeGeoMap::addMapItem(QDeclarativeGeoMapItemBase *item)
}
/*!
- \qmlproperty list<MapItem> QtLocation5::Map::mapItems
+ \qmlproperty list<MapItem> QtLocation::Map::mapItems
Returns the list of all map items in no particular order.
These items include items that were declared statically as part of
@@ -955,7 +953,7 @@ QList<QObject *> QDeclarativeGeoMap::mapItems()
}
/*!
- \qmlmethod void QtLocation5::Map::removeMapItem(MapItem item)
+ \qmlmethod void QtLocation::Map::removeMapItem(MapItem item)
Removes the given \a item from the Map (for example MapQuickItem, MapCircle). If
the MapItem does not exist or was not previously added to the map, the
@@ -981,7 +979,7 @@ void QDeclarativeGeoMap::removeMapItem(QDeclarativeGeoMapItemBase *ptr)
}
/*!
- \qmlmethod void QtLocation5::Map::clearMapItems()
+ \qmlmethod void QtLocation::Map::clearMapItems()
Removes all items from the map.
@@ -1005,7 +1003,7 @@ void QDeclarativeGeoMap::clearMapItems()
}
/*!
- \qmlproperty MapType QtLocation5::Map::activeMapType
+ \qmlproperty MapType QtLocation::Map::activeMapType
\brief Access to the currently active \l{MapType}{map type}.
@@ -1039,7 +1037,7 @@ void QDeclarativeGeoMap::geometryChanged(const QRectF &newGeometry, const QRectF
}
/*!
- \qmlmethod QtLocation5::Map::fitViewportToGeoShape(QGeoShape shape)
+ \qmlmethod QtLocation::Map::fitViewportToGeoShape(QGeoShape shape)
Fits the current viewport to the boundary of the shape. The camera is positioned
in the center of the shape, and at the largest integral zoom level possible which
@@ -1118,7 +1116,7 @@ void QDeclarativeGeoMap::fitViewportToGeoShape(const QVariant &variantShape)
}
/*!
- \qmlmethod QtLocation5::Map::fitViewportToMapItems()
+ \qmlmethod QtLocation::Map::fitViewportToMapItems()
Fits the current viewport to the boundary of all map items. The camera is positioned
in the center of the map items, and at the largest integral zoom level possible which
diff --git a/src/imports/location/qdeclarativegeomapgesturearea.cpp b/src/imports/location/qdeclarativegeomapgesturearea.cpp
index f9959e19..9314b42b 100644
--- a/src/imports/location/qdeclarativegeomapgesturearea.cpp
+++ b/src/imports/location/qdeclarativegeomapgesturearea.cpp
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapPinchEvent
\instantiates QDeclarativeGeoMapPinchEvent
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\brief MapPinchEvent type provides basic information about pinch event.
@@ -104,13 +104,13 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty QPoint QtLocation5::MapPinchEvent::center
+ \qmlproperty QPoint QtLocation::MapPinchEvent::center
This read-only property holds the current center point.
*/
/*!
- \qmlproperty real QtLocation5::MapPinchEvent::angle
+ \qmlproperty real QtLocation::MapPinchEvent::angle
This read-only property holds the current angle between the two points in
the range -180 to 180. Positive values for the angles mean counter-clockwise
@@ -119,15 +119,15 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty QPoint QtLocation5::MapPinchEvent::point1
- \qmlproperty QPoint QtLocation5::MapPinchEvent::point2
+ \qmlproperty QPoint QtLocation::MapPinchEvent::point1
+ \qmlproperty QPoint QtLocation::MapPinchEvent::point2
These read-only properties hold the actual touch points generating the pinch.
The points are not in any particular order.
*/
/*!
- \qmlproperty int QtLocation5::MapPinchEvent::pointCount
+ \qmlproperty int QtLocation::MapPinchEvent::pointCount
This read-only property holds the number of points currently touched.
The MapPinch will not react until two touch points have initiated a gesture,
@@ -135,7 +135,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty bool QtLocation5::MapPinchEvent::accepted
+ \qmlproperty bool QtLocation::MapPinchEvent::accepted
Setting this property to false in the \c MapPinch::onPinchStarted handler
will result in no further pinch events being generated, and the gesture
@@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE
\qmltype MapGestureArea
\instantiates QDeclarativeGeoMapGestureArea
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\brief The MapGestureArea type provides Map gesture interaction.
@@ -187,7 +187,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty bool QtLocation5::MapGestureArea::enabled
+ \qmlproperty bool QtLocation::MapGestureArea::enabled
This property holds whether the gestures are enabled.
Note: disabling gestures during an active gesture does not have effect on
@@ -196,7 +196,7 @@ QT_BEGIN_NAMESPACE
/*!
- \qmlproperty bool QtLocation5::MapGestureArea::panEnabled
+ \qmlproperty bool QtLocation::MapGestureArea::panEnabled
This property holds whether the pan gestures are enabled.
Note: disabling gestures during an active gesture does not have effect on
@@ -204,7 +204,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty bool QtLocation5::MapGestureArea::pinchEnabled
+ \qmlproperty bool QtLocation::MapGestureArea::pinchEnabled
This property holds whether the pinch gestures are enabled.
Note: disabling gestures during an active gesture does not have effect on
@@ -212,19 +212,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty bool QtLocation5::MapGestureArea::isPinchActive
+ \qmlproperty bool QtLocation::MapGestureArea::isPinchActive
This read-only property holds whether any pinch gesture is active.
*/
/*!
- \qmlproperty bool QtLocation5::MapGestureArea::isPanActive
+ \qmlproperty bool QtLocation::MapGestureArea::isPanActive
This read-only property holds whether any pan gesture (panning or flicking) is active.
*/
/*!
- \qmlproperty enumeration QtLocation5::MapGestureArea::activeGestures
+ \qmlproperty enumeration QtLocation::MapGestureArea::activeGestures
This property holds the gestures that will be active. By default
the zoom, pan and flick gestures are enabled.
@@ -246,7 +246,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty real QtLocation5::MapGestureArea::maximumZoomLevelChange
+ \qmlproperty real QtLocation::MapGestureArea::maximumZoomLevelChange
This property holds the maximum zoom level change per pinch, essentially
meant to be used for setting the zoom sensitivity.
@@ -275,7 +275,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::pinchStarted(PinchEvent event)
+ \qmlsignal QtLocation::MapGestureArea::pinchStarted(PinchEvent event)
Raised when a pinch gesture is started.
@@ -283,7 +283,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::pinchUpdated(PinchEvent event)
+ \qmlsignal QtLocation::MapGestureArea::pinchUpdated(PinchEvent event)
Once a pinch has begun this event gets raised as the user moves her fingers
across the map.
@@ -292,7 +292,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::pinchFinished(PinchEvent event)
+ \qmlsignal QtLocation::MapGestureArea::pinchFinished(PinchEvent event)
The end of a pinch gesture is signaled by this event.
@@ -300,7 +300,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::panStarted()
+ \qmlsignal QtLocation::MapGestureArea::panStarted()
This handler is called when the view begins moving due to user
interaction. Typically this means that the user is dragging a finger -
@@ -308,7 +308,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::panFinished()
+ \qmlsignal QtLocation::MapGestureArea::panFinished()
This handler is called when the view stops moving due to user
interaction. If a flick was generated, this handler will
@@ -319,7 +319,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::flickStarted()
+ \qmlsignal QtLocation::MapGestureArea::flickStarted()
This handler is called when the view is flicked. A flick
starts from the point that the mouse or touch is released,
@@ -327,7 +327,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlsignal QtLocation5::MapGestureArea::flickFinished()
+ \qmlsignal QtLocation::MapGestureArea::flickFinished()
This handler is called when the view stops moving due to a flick.
The order of panFinished() and flickFinished() is not specified.
@@ -337,7 +337,6 @@ QDeclarativeGeoMapGestureArea::QDeclarativeGeoMapGestureArea(QDeclarativeGeoMap
: QObject(parent),
declarativeMap_(map),
enabled_(true),
- usingTouch_(false),
activeGestures_(ZoomGesture | PanGesture | FlickGesture)
{
map_ = 0;
@@ -348,8 +347,8 @@ QDeclarativeGeoMapGestureArea::QDeclarativeGeoMapGestureArea(QDeclarativeGeoMap
touchPointState_ = touchPoints0;
pinchState_ = pinchInactive;
panState_ = panInactive;
-}
+}
/*!
\internal
*/
@@ -607,51 +606,27 @@ bool QDeclarativeGeoMapGestureArea::mouseReleaseEvent(QMouseEvent *)
/*!
\internal
*/
-bool QDeclarativeGeoMapGestureArea::touchEvent(QTouchEvent *event)
+void QDeclarativeGeoMapGestureArea::touchEvent(QTouchEvent *event)
{
- usingTouch_ = true;
-
- if (!(enabled_ && activeGestures_))
- return false;
-
switch (event->type()) {
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
- foreach (const QTouchEvent::TouchPoint &p, event->touchPoints()) {
- QList<QTouchEvent::TouchPoint>::iterator i;
- for (i = touchPoints_.begin(); i != touchPoints_.end(); ++i) {
- if (i->id() == p.id()) {
- i = touchPoints_.erase(i);
- break;
- }
- }
- switch (p.state()) {
- case Qt::TouchPointPressed:
- case Qt::TouchPointMoved:
- case Qt::TouchPointStationary:
- touchPoints_.insert(i, p);
- break;
- case Qt::TouchPointReleased:
- // already removed
- break;
- default:
- break;
+ touchPoints_.clear();
+ for (int i = 0; i < event->touchPoints().count(); ++i) {
+ if (!(event->touchPoints().at(i).state() & Qt::TouchPointReleased)) {
+ touchPoints_ << event->touchPoints().at(i);
}
}
update();
break;
-
case QEvent::TouchEnd:
touchPoints_.clear();
update();
break;
-
default:
// no-op
break;
}
-
- return true;
}
/*!
@@ -659,31 +634,22 @@ bool QDeclarativeGeoMapGestureArea::touchEvent(QTouchEvent *event)
*/
bool QDeclarativeGeoMapGestureArea::filterMapChildMouseEvent(QMouseEvent *event)
{
- if (usingTouch_)
- return false;
-
- if (!(enabled_ && activeGestures_))
- return false;
-
- if (isPanActive() || isPinchActive())
- return true;
-
- // Don't filter the event, but use it to see if we should start
- // a gesture.
+ bool used = false;
switch (event->type()) {
case QEvent::MouseButtonPress:
- mousePressEvent(event);
+ used = mousePressEvent(event);
break;
case QEvent::MouseButtonRelease:
- mouseReleaseEvent(event);
+ used = mouseReleaseEvent(event);
break;
case QEvent::MouseMove:
- mouseMoveEvent(event);
+ used = mouseMoveEvent(event);
break;
default:
+ used = false;
break;
}
- return false;
+ return used && (isPanActive() || isPinchActive());
}
/*!
@@ -691,18 +657,8 @@ bool QDeclarativeGeoMapGestureArea::filterMapChildMouseEvent(QMouseEvent *event)
*/
bool QDeclarativeGeoMapGestureArea::filterMapChildTouchEvent(QTouchEvent *event)
{
- usingTouch_ = true;
-
- if (!(enabled_ && activeGestures_))
- return false;
-
- if (event->touchPoints().count() > 1 || isPanActive() || isPinchActive())
- return true;
-
- // Don't filter the event, but use it to see if we should start
- // a gesture.
touchEvent(event);
- return false;
+ return isPanActive() || isPinchActive();
}
/*!
@@ -777,7 +733,7 @@ void QDeclarativeGeoMapGestureArea::touchPointStateMachine()
clearTouchData();
startOneTouchPoint();
touchPointState_ = touchPoints1;
- } else if (touchPoints_.count() >= 2) {
+ } else if (touchPoints_.count() == 2) {
clearTouchData();
startTwoTouchPoints();
touchPointState_ = touchPoints2;
@@ -786,7 +742,7 @@ void QDeclarativeGeoMapGestureArea::touchPointStateMachine()
case touchPoints1:
if (touchPoints_.count() == 0) {
touchPointState_ = touchPoints0;
- } else if (touchPoints_.count() >= 2) {
+ } else if (touchPoints_.count() == 2) {
touchCenterCoord_ = map_->screenPositionToCoordinate(sceneCenter_, false);
startTwoTouchPoints();
touchPointState_ = touchPoints2;
diff --git a/src/imports/location/qdeclarativegeomapgesturearea_p.h b/src/imports/location/qdeclarativegeomapgesturearea_p.h
index 955e20c0..0f0dc194 100644
--- a/src/imports/location/qdeclarativegeomapgesturearea_p.h
+++ b/src/imports/location/qdeclarativegeomapgesturearea_p.h
@@ -160,7 +160,7 @@ public:
qreal flickDeceleration() const;
void setFlickDeceleration(qreal deceleration);
- bool touchEvent(QTouchEvent *event);
+ void touchEvent(QTouchEvent *event);
bool mousePressEvent(QMouseEvent *event);
bool mouseMoveEvent(QMouseEvent *event);
@@ -229,7 +229,6 @@ private:
QGeoMap *map_;
QDeclarativeGeoMap *declarativeMap_;
bool enabled_;
- bool usingTouch_;
struct Pinch
{
diff --git a/src/imports/location/qdeclarativegeomapitemview.cpp b/src/imports/location/qdeclarativegeomapitemview.cpp
index fc0077ce..1ae8cb68 100644
--- a/src/imports/location/qdeclarativegeomapitemview.cpp
+++ b/src/imports/location/qdeclarativegeomapitemview.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapItemView
\instantiates QDeclarativeGeoMapItemView
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
\inherits QQuickItem
@@ -97,7 +97,7 @@ void QDeclarativeGeoMapItemView::componentComplete()
}
/*!
- \qmlproperty model QtLocation5::MapItemView::model
+ \qmlproperty model QtLocation::MapItemView::model
This property holds the model that provides data used for
creating the map item defined by the delegate.
@@ -180,7 +180,7 @@ void QDeclarativeGeoMapItemView::itemModelRowsRemoved(QModelIndex, int start, in
}
/*!
- \qmlproperty Component QtLocation5::MapItemView::delegate
+ \qmlproperty Component QtLocation::MapItemView::delegate
This property holds the delegate which defines how each item in the
model should be displayed. The Component must contain exactly one
@@ -203,7 +203,7 @@ void QDeclarativeGeoMapItemView::setDelegate(QQmlComponent *delegate)
}
/*!
- \qmlproperty Component QtLocation5::MapItemView::autoFitViewport
+ \qmlproperty Component QtLocation::MapItemView::autoFitViewport
This property controls whether to automatically pan and zoom the viewport
to display all map items when items are added or removed.
diff --git a/src/imports/location/qdeclarativegeomapmousearea.cpp b/src/imports/location/qdeclarativegeomapmousearea.cpp
index a9f6fffa..8146ecc3 100644
--- a/src/imports/location/qdeclarativegeomapmousearea.cpp
+++ b/src/imports/location/qdeclarativegeomapmousearea.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
\brief The MapMouseArea item enables simple mouse handling.
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
Like a standard Qt Quick \l{MouseArea}, the MapMouseArea provides mouse
@@ -140,7 +140,7 @@ QDeclarativeGeoMapMouseArea::~QDeclarativeGeoMapMouseArea()
}
/*!
- \qmlmethod coordinate QtLocation5::MapMouseArea::mouseToCoordinate(MouseEvent event)
+ \qmlmethod coordinate QtLocation::MapMouseArea::mouseToCoordinate(MouseEvent event)
Converts the \a event's coordinates to geo coordinates.
*/
@@ -320,8 +320,8 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
}
/*!
- \qmlproperty real QtLocation5::MapMouseArea::mouseX
- \qmlproperty real QtLocation5::MapMouseArea::mouseY
+ \qmlproperty real QtLocation::MapMouseArea::mouseX
+ \qmlproperty real QtLocation::MapMouseArea::mouseY
These properties hold the screen coordinates of the mouse cursor.
@@ -332,7 +332,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlproperty bool QtLocation5::MapMouseArea::containsMouse
+ \qmlproperty bool QtLocation::MapMouseArea::containsMouse
This property holds whether the mouse is currently inside the mouse area.
\warning This property is not updated if the area moves under the mouse: \e containsMouse will not change.
@@ -340,19 +340,19 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlproperty bool QtLocation5::MapMouseArea::pressed
+ \qmlproperty bool QtLocation::MapMouseArea::pressed
This property holds whether the mouse area is currently pressed.
*/
/*!
- \qmlproperty bool QtLocation5::MapMouseArea::enabled
+ \qmlproperty bool QtLocation::MapMouseArea::enabled
This property holds whether the item accepts mouse events.
By default, this property is true.
*/
/*!
- \qmlproperty MouseButton QtLocation5::MapMouseArea::pressedButtons
+ \qmlproperty MouseButton QtLocation::MapMouseArea::pressedButtons
This property holds the mouse buttons currently pressed.
It contains a bitwise combination of:
@@ -366,7 +366,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlproperty Qt::MouseButtons QtLocation5::MapMouseArea::acceptedButtons
+ \qmlproperty Qt::MouseButtons QtLocation::MapMouseArea::acceptedButtons
This property holds the mouse buttons that the mouse area reacts to.
The available buttons are:
@@ -387,7 +387,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onPressed(MapMouseEvent mouse)
+ \qmlsignal QtLocation::MapMouseArea::onPressed(MapMouseEvent mouse)
This handler is called when there is a press.
@@ -403,7 +403,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onReleased(MapMouseEvent mouse)
+ \qmlsignal QtLocation::MapMouseArea::onReleased(MapMouseEvent mouse)
This handler is called when there is a release.
The \l {MapMouseEvent}{mouse} parameter provides information about the
@@ -414,7 +414,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onClicked(MapMouseEvent mouse)
+ \qmlsignal QtLocation::MapMouseArea::onClicked(MapMouseEvent mouse)
This handler is called when there is a click. A click is defined as a
press followed by a release, both inside the MapMouseArea (pressing,
@@ -429,7 +429,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onDoubleClicked(MapMouseEvent mouse)
+ \qmlsignal QtLocation::MapMouseArea::onDoubleClicked(MapMouseEvent mouse)
This handler is called when there is a double-click (a press followed
by a release followed by a press).
@@ -444,7 +444,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onEntered()
+ \qmlsignal QtLocation::MapMouseArea::onEntered()
This handler is called when the mouse enters the mouse area.
@@ -455,7 +455,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onPositionChanged(MapMouseEvent mouse)
+ \qmlsignal QtLocation::MapMouseArea::onPositionChanged(MapMouseEvent mouse)
This handler is called when the mouse position changes.
@@ -468,7 +468,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onPressAndHold(MapMouseEvent mouse)
+ \qmlsignal QtLocation::MapMouseArea::onPressAndHold(MapMouseEvent mouse)
This handler is called when there is a long press (currently 800ms).
The \l {MapMouseEvent}{mouse} parameter provides information about the press, including the x and y
@@ -478,7 +478,7 @@ QQuickItem *QDeclarativeGeoMapMouseArea::parentMapItem()
*/
/*!
- \qmlsignal QtLocation5::MapMouseArea::onExited()
+ \qmlsignal QtLocation::MapMouseArea::onExited()
This handler is called when the mouse exits the mouse area.
diff --git a/src/imports/location/qdeclarativegeomapmouseevent.cpp b/src/imports/location/qdeclarativegeomapmouseevent.cpp
index f2468daf..23e245b9 100644
--- a/src/imports/location/qdeclarativegeomapmouseevent.cpp
+++ b/src/imports/location/qdeclarativegeomapmouseevent.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapMouseEvent
\instantiates QDeclarativeGeoMapMouseEvent
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
@@ -77,7 +77,7 @@ QDeclarativeGeoMapMouseEvent::~QDeclarativeGeoMapMouseEvent()
}
/*!
- \qmlproperty bool QtLocation5::MapMouseEvent::accepted
+ \qmlproperty bool QtLocation::MapMouseEvent::accepted
Setting \a accepted to true prevents the mouse event from being
propagated to items below the item currently handling the event.
@@ -97,7 +97,7 @@ bool QDeclarativeGeoMapMouseEvent::accepted() const
}
/*!
- \qmlproperty enumeration QtLocation5::MapMouseEvent::button
+ \qmlproperty enumeration QtLocation::MapMouseEvent::button
This property holds the button that caused the event. It can be one of:
@@ -121,7 +121,7 @@ int QDeclarativeGeoMapMouseEvent::button() const
}
/*!
- \qmlproperty enumeration QtLocation5::MapMouseEvent::buttons
+ \qmlproperty enumeration QtLocation::MapMouseEvent::buttons
This property holds the mouse buttons pressed when the event was
generated. For mouse move events, this is all buttons that are pressed
@@ -151,7 +151,7 @@ int QDeclarativeGeoMapMouseEvent::buttons() const
}
/*!
- \qmlproperty int QtLocation5::MapMouseEvent::modifiers
+ \qmlproperty int QtLocation::MapMouseEvent::modifiers
This property holds the keyboard modifier flags that existed immediately
before the event occurred.
@@ -178,7 +178,7 @@ int QDeclarativeGeoMapMouseEvent::modifiers() const
}
/*!
- \qmlproperty bool QtLocation5::MapMouseEvent::wasHeld
+ \qmlproperty bool QtLocation::MapMouseEvent::wasHeld
This property is true if the mouse button has been held pressed longer the threshold (800ms).
*/
@@ -194,7 +194,7 @@ bool QDeclarativeGeoMapMouseEvent::wasHeld() const
}
/*!
- \qmlproperty int QtLocation5::MapMouseEvent::x
+ \qmlproperty int QtLocation::MapMouseEvent::x
This property holds the x-screen coordinate of the position supplied
by the mouse event.
@@ -211,7 +211,7 @@ int QDeclarativeGeoMapMouseEvent::x() const
}
/*!
- \qmlproperty int QtLocation5::MapMouseEvent::y
+ \qmlproperty int QtLocation::MapMouseEvent::y
This property holds the y-screen coordinate of the position supplied
by the mouse event.
@@ -228,7 +228,7 @@ int QDeclarativeGeoMapMouseEvent::y() const
}
/*!
- \qmlproperty coordinate QtLocation5::MapMouseEvent::coordinate
+ \qmlproperty coordinate QtLocation::MapMouseEvent::coordinate
This property holds the coordinate corresponding to the latitude
and longitude of the position on the map at which the mouse event
diff --git a/src/imports/location/qdeclarativegeomapquickitem.cpp b/src/imports/location/qdeclarativegeomapquickitem.cpp
index 3db74289..8bb78e14 100644
--- a/src/imports/location/qdeclarativegeomapquickitem.cpp
+++ b/src/imports/location/qdeclarativegeomapquickitem.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapQuickItem
\instantiates QDeclarativeGeoMapQuickItem
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
diff --git a/src/imports/location/qdeclarativegeomaptype.cpp b/src/imports/location/qdeclarativegeomaptype.cpp
index 7f130d1c..b85bb66d 100644
--- a/src/imports/location/qdeclarativegeomaptype.cpp
+++ b/src/imports/location/qdeclarativegeomaptype.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
\qmltype MapType
\instantiates QDeclarativeGeoMapType
\inherits QObject
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
diff --git a/src/imports/location/qdeclarativegeoroute.cpp b/src/imports/location/qdeclarativegeoroute.cpp
index 9b57b0d4..4a4fe9f8 100644
--- a/src/imports/location/qdeclarativegeoroute.cpp
+++ b/src/imports/location/qdeclarativegeoroute.cpp
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Route
\instantiates QDeclarativeGeoRoute
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-routing
\since Qt Location 5.0
@@ -114,7 +114,7 @@ QList<QGeoCoordinate> QDeclarativeGeoRoute::routePath()
}
/*!
- \qmlproperty georectangle QtLocation5::Route::bounds
+ \qmlproperty georectangle QtLocation::Route::bounds
Read-only property which holds a bounding box which encompasses the entire route.
@@ -126,7 +126,7 @@ QGeoRectangle QDeclarativeGeoRoute::bounds() const
}
/*!
- \qmlproperty int QtLocation5::Route::travelTime
+ \qmlproperty int QtLocation::Route::travelTime
Read-only property which holds the estimated amount of time it will take to
traverse this route, in seconds.
@@ -139,7 +139,7 @@ int QDeclarativeGeoRoute::travelTime() const
}
/*!
- \qmlproperty real QtLocation5::Route::distance
+ \qmlproperty real QtLocation::Route::distance
Read-only property which holds distance covered by this route, in meters.
*/
@@ -150,7 +150,7 @@ qreal QDeclarativeGeoRoute::distance() const
}
/*!
- \qmlproperty QJSValue QtLocation5::Route::path
+ \qmlproperty QJSValue QtLocation::Route::path
Read-only property which holds the geographical coordinates of this route.
Coordinates are listed in the order in which they would be traversed by someone
@@ -181,7 +181,7 @@ QJSValue QDeclarativeGeoRoute::path() const
pathArray->putIndexed(i, cv);
}
- return new QJSValuePrivate(v4, pathArray);
+ return new QJSValuePrivate(v4, QV4::ValueRef(pathArray));
}
void QDeclarativeGeoRoute::setPath(const QJSValue &value)
@@ -212,7 +212,7 @@ void QDeclarativeGeoRoute::setPath(const QJSValue &value)
}
/*!
- \qmlproperty list<RouteSegment> QtLocation5::Route::segments
+ \qmlproperty list<RouteSegment> QtLocation::Route::segments
Read-only property which holds the list of \l RouteSegment objects of this route.
diff --git a/src/imports/location/qdeclarativegeoroutemodel.cpp b/src/imports/location/qdeclarativegeoroutemodel.cpp
index 8e91873d..48375c56 100644
--- a/src/imports/location/qdeclarativegeoroutemodel.cpp
+++ b/src/imports/location/qdeclarativegeoroutemodel.cpp
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype RouteModel
\instantiates QDeclarativeGeoRouteModel
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-routing
\since Qt Location 5.0
@@ -145,11 +145,11 @@ QDeclarativeGeoRouteModel::~QDeclarativeGeoRouteModel()
}
/*!
- \qmlproperty int QtLocation5::RouteModel::count
+ \qmlproperty int QtLocation::RouteModel::count
This property holds how many routes the model currently has.
Amongst other uses, you can use this value when accessing routes
- via the QtLocation5::RouteModel::get -method.
+ via the QtLocation::RouteModel::get -method.
*/
int QDeclarativeGeoRouteModel::count() const
@@ -158,7 +158,7 @@ int QDeclarativeGeoRouteModel::count() const
}
/*!
- \qmlmethod QtLocation5::RouteModel::reset()
+ \qmlmethod QtLocation::RouteModel::reset()
Resets the model. All route data is cleared, any outstanding requests
are aborted and possible errors are cleared. Model status will be set
@@ -183,7 +183,7 @@ void QDeclarativeGeoRouteModel::reset()
}
/*!
- \qmlmethod QtLocation5::RouteModel::cancel()
+ \qmlmethod QtLocation::RouteModel::cancel()
Cancels any outstanding requests and clears errors. Model status will be set to either
RouteModel.Null or RouteModel.Ready.
@@ -210,7 +210,7 @@ void QDeclarativeGeoRouteModel::abortRequest()
/*!
- \qmlmethod QtLocation5::RouteModel::get(int)
+ \qmlmethod QtLocation::RouteModel::get(int)
Returns the Route at given index. Use \l count property to check the
amount of routes available. The routes are indexed from zero, so the accessible range
@@ -328,7 +328,7 @@ void QDeclarativeGeoRouteModel::queryDetailsChanged()
}
/*!
- \qmlproperty Plugin QtLocation5::RouteModel::plugin
+ \qmlproperty Plugin QtLocation::RouteModel::plugin
This property holds the plugin that providers the actual
routing service. Note that all plugins do not necessarily
@@ -364,7 +364,7 @@ void QDeclarativeGeoRouteModel::setQuery(QDeclarativeGeoRouteQuery *query)
}
/*!
- \qmlproperty RouteQuery QtLocation5::RouteModel::query
+ \qmlproperty RouteQuery QtLocation::RouteModel::query
This property holds the data of the route request.
The primary data are the waypoint coordinates and possible further
@@ -389,7 +389,7 @@ void QDeclarativeGeoRouteModel::setAutoUpdate(bool autoUpdate)
}
/*!
- \qmlproperty bool QtLocation5::RouteModel::autoUpdate
+ \qmlproperty bool QtLocation::RouteModel::autoUpdate
This property controls whether the Model automatically updates in response
to changes in its attached RouteQuery. The default value of this property
@@ -422,7 +422,7 @@ void QDeclarativeGeoRouteModel::setStatus(QDeclarativeGeoRouteModel::Status stat
}
/*!
- \qmlproperty enumeration QtLocation5::RouteModel::status
+ \qmlproperty enumeration QtLocation::RouteModel::status
This read-only property holds the current status of the model.
@@ -454,7 +454,7 @@ void QDeclarativeGeoRouteModel::setErrorString(const QString &error)
}
/*!
- \qmlproperty string QtLocation5::RouteModel::errorString
+ \qmlproperty string QtLocation::RouteModel::errorString
This read-only property holds the textual presentation of latest routing error.
If no error has occurred or the model has been reset, an empty string is returned.
@@ -469,7 +469,7 @@ QString QDeclarativeGeoRouteModel::errorString() const
}
/*!
- \qmlproperty enumeration QtLocation5::RouteModel::error
+ \qmlproperty enumeration QtLocation::RouteModel::error
This read-only property holds the latest error value of the routing request.
@@ -497,7 +497,7 @@ void QDeclarativeGeoRouteModel::setError(RouteError error)
}
/*!
- \qmlmethod QtLocation5::RouteModel::update()
+ \qmlmethod QtLocation::RouteModel::update()
Instructs the RouteModel to update its data. This is most useful
when \l autoUpdate is disabled, to force a refresh when the query
@@ -597,7 +597,7 @@ void QDeclarativeGeoRouteModel::routingError(QGeoRouteReply *reply,
/*!
\qmltype RouteQuery
\instantiates QDeclarativeGeoRouteQuery
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-routing
\since Qt Location 5.0
@@ -746,7 +746,7 @@ QJSValue QDeclarativeGeoRouteQuery::waypoints()
waypointArray->putIndexed(i, cv);
}
- return new QJSValuePrivate(v4, waypointArray);
+ return new QJSValuePrivate(v4, QV4::ValueRef(waypointArray));
}
void QDeclarativeGeoRouteQuery::setWaypoints(const QJSValue &value)
@@ -805,7 +805,7 @@ QJSValue QDeclarativeGeoRouteQuery::excludedAreas() const
excludedAreasArray->putIndexed(i, cv);
}
- return new QJSValuePrivate(v4, excludedAreasArray);
+ return new QJSValuePrivate(v4, QV4::ValueRef(excludedAreasArray));
}
void QDeclarativeGeoRouteQuery::setExcludedAreas(const QJSValue &value)
@@ -837,7 +837,7 @@ void QDeclarativeGeoRouteQuery::setExcludedAreas(const QJSValue &value)
}
/*!
- \qmlmethod QtLocation5::RouteQuery::addExcludedArea(georectangle)
+ \qmlmethod QtLocation::RouteQuery::addExcludedArea(georectangle)
Adds the given area to excluded areas (areas that the route must not cross).
Same area can only be added once.
@@ -867,7 +867,7 @@ void QDeclarativeGeoRouteQuery::addExcludedArea(const QGeoRectangle &area)
}
/*!
- \qmlmethod QtLocation5::RouteQuery::removeExcludedArea(georectangle)
+ \qmlmethod QtLocation::RouteQuery::removeExcludedArea(georectangle)
Removes the given area to excluded areas (areas that the route must not cross).
@@ -894,7 +894,7 @@ void QDeclarativeGeoRouteQuery::removeExcludedArea(const QGeoRectangle &area)
}
/*!
- \qmlmethod QtLocation5::RouteQuery::clearExcludedAreas()
+ \qmlmethod QtLocation::RouteQuery::clearExcludedAreas()
Clears all excluded areas (areas that the route must not cross).
@@ -913,7 +913,7 @@ void QDeclarativeGeoRouteQuery::clearExcludedAreas()
}
/*!
- \qmlmethod QtLocation5::RouteQuery::addWaypoint(coordinate)
+ \qmlmethod QtLocation::RouteQuery::addWaypoint(coordinate)
Appends a coordinate to the list of waypoints. Same coordinate
can be set multiple times.
@@ -938,7 +938,7 @@ void QDeclarativeGeoRouteQuery::addWaypoint(const QGeoCoordinate &waypoint)
}
/*!
- \qmlmethod QtLocation5::RouteQuery::removeWaypoint(coordinate)
+ \qmlmethod QtLocation::RouteQuery::removeWaypoint(coordinate)
Removes the given from the list of waypoints. In case same coordinate
appears multiple times, the most recently added coordinate instance is
@@ -965,7 +965,7 @@ void QDeclarativeGeoRouteQuery::removeWaypoint(const QGeoCoordinate &waypoint)
}
/*!
- \qmlmethod QtLocation5::RouteQuery::clearWaypoints()
+ \qmlmethod QtLocation::RouteQuery::clearWaypoints()
Clears all waypoints.
@@ -983,7 +983,7 @@ void QDeclarativeGeoRouteQuery::clearWaypoints()
}
/*!
- \qmlmethod QtLocation5::RouteQuery::setFeatureWeight(FeatureType, FeatureWeight)
+ \qmlmethod QtLocation::RouteQuery::setFeatureWeight(FeatureType, FeatureWeight)
Defines the weight to associate with a feature during the planning of a
route.
@@ -1025,7 +1025,7 @@ void QDeclarativeGeoRouteQuery::setFeatureWeight(FeatureType featureType, Featur
}
/*!
- \qmlmethod QtLocation5::RouteQuery::resetFeatureWeights()
+ \qmlmethod QtLocation::RouteQuery::resetFeatureWeights()
Resets all feature weights to their default state (NeutralFeatureWeight).
@@ -1045,7 +1045,7 @@ void QDeclarativeGeoRouteQuery::resetFeatureWeights()
}
/*!
- \qmlmethod FeatureWeight QtLocation5::RouteQuery::featureWeight(FeatureType featureType)
+ \qmlmethod FeatureWeight QtLocation::RouteQuery::featureWeight(FeatureType featureType)
Gets the weight for the \a featureType.
diff --git a/src/imports/location/qdeclarativegeoroutesegment.cpp b/src/imports/location/qdeclarativegeoroutesegment.cpp
index 5bcd5f00..3335e3cd 100644
--- a/src/imports/location/qdeclarativegeoroutesegment.cpp
+++ b/src/imports/location/qdeclarativegeoroutesegment.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype RouteSegment
\instantiates QDeclarativeGeoRouteSegment
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-routing
\since Qt Location 5.0
@@ -97,7 +97,7 @@ QDeclarativeGeoRouteSegment::QDeclarativeGeoRouteSegment(const QGeoRouteSegment
QDeclarativeGeoRouteSegment::~QDeclarativeGeoRouteSegment() {}
/*!
- \qmlproperty int QtLocation5::RouteSegment::travelTime
+ \qmlproperty int QtLocation::RouteSegment::travelTime
Read-only property which holds the estimated amount of time it will take to
traverse this segment, in seconds.
@@ -110,7 +110,7 @@ int QDeclarativeGeoRouteSegment::travelTime() const
}
/*!
- \qmlproperty real QtLocation5::RouteSegment::distance
+ \qmlproperty real QtLocation::RouteSegment::distance
Read-only property which holds the distance covered by this segment of the route, in meters.
@@ -122,7 +122,7 @@ qreal QDeclarativeGeoRouteSegment::distance() const
}
/*!
- \qmlproperty RouteManeuver QtLocation5::RouteSegment::maneuver
+ \qmlproperty RouteManeuver QtLocation::RouteSegment::maneuver
Read-only property which holds the maneuver for this route segment.
@@ -136,7 +136,7 @@ QDeclarativeGeoManeuver *QDeclarativeGeoRouteSegment::maneuver() const
}
/*!
- \qmlproperty QJSValue QtLocation5::RouteSegment::path
+ \qmlproperty QJSValue QtLocation::RouteSegment::path
Read-only property which holds the geographical coordinates of this segment.
Coordinates are listed in the order in which they would be traversed by someone
@@ -167,7 +167,7 @@ QJSValue QDeclarativeGeoRouteSegment::path() const
pathArray->putIndexed(i, cv);
}
- return new QJSValuePrivate(v4, pathArray);
+ return new QJSValuePrivate(v4, QV4::ValueRef(pathArray));
}
#include "moc_qdeclarativegeoroutesegment_p.cpp"
diff --git a/src/imports/location/qdeclarativegeoserviceprovider.cpp b/src/imports/location/qdeclarativegeoserviceprovider.cpp
index 49ad3e4c..f91b9ed1 100644
--- a/src/imports/location/qdeclarativegeoserviceprovider.cpp
+++ b/src/imports/location/qdeclarativegeoserviceprovider.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Plugin
\instantiates QDeclarativeGeoServiceProvider
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-common
\since Qt Location 5.0
@@ -744,7 +744,7 @@ bool QDeclarativeGeoServiceProviderRequirements::matches(const QGeoServiceProvid
/*!
\qmltype PluginParameter
\instantiates QDeclarativeGeoServiceProviderParameter
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-common
\since Qt Location 5.0
diff --git a/src/imports/location/qdeclarativepolygonmapitem.cpp b/src/imports/location/qdeclarativepolygonmapitem.cpp
index 9bb30515..efd8be2c 100644
--- a/src/imports/location/qdeclarativepolygonmapitem.cpp
+++ b/src/imports/location/qdeclarativepolygonmapitem.cpp
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapPolygon
\instantiates QDeclarativePolygonMapItem
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
@@ -401,7 +401,7 @@ QJSValue QDeclarativePolygonMapItem::path() const
pathArray->putIndexed(i, cv);
}
- return new QJSValuePrivate(v4, pathArray);
+ return new QJSValuePrivate(v4, QV4::ValueRef(pathArray));
}
void QDeclarativePolygonMapItem::setPath(const QJSValue &value)
diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp
index 95c23bbb..5ffe9e8a 100644
--- a/src/imports/location/qdeclarativepolylinemapitem.cpp
+++ b/src/imports/location/qdeclarativepolylinemapitem.cpp
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapPolyline
\instantiates QDeclarativePolylineMapItem
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
@@ -512,7 +512,7 @@ QJSValue QDeclarativePolylineMapItem::path() const
pathArray->putIndexed(i, cv);
}
- return new QJSValuePrivate(v4, pathArray);
+ return new QJSValuePrivate(v4, QV4::ValueRef(pathArray));
}
void QDeclarativePolylineMapItem::setPath(const QJSValue &value)
diff --git a/src/imports/location/qdeclarativerectanglemapitem.cpp b/src/imports/location/qdeclarativerectanglemapitem.cpp
index d1654e41..797ba26d 100644
--- a/src/imports/location/qdeclarativerectanglemapitem.cpp
+++ b/src/imports/location/qdeclarativerectanglemapitem.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype MapRectangle
\instantiates QDeclarativeRectangleMapItem
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
diff --git a/src/imports/location/qdeclarativeroutemapitem.cpp b/src/imports/location/qdeclarativeroutemapitem.cpp
index 1af8e120..f084dbb8 100644
--- a/src/imports/location/qdeclarativeroutemapitem.cpp
+++ b/src/imports/location/qdeclarativeroutemapitem.cpp
@@ -50,7 +50,7 @@
/*!
\qmltype MapRoute
\instantiates QDeclarativeRouteMapItem
- \inqmlmodule QtLocation 5.0
+ \inqmlmodule QtLocation
\ingroup qml-QtLocation5-maps
\since Qt Location 5.0
diff --git a/src/imports/positioning/locationsingleton.cpp b/src/imports/positioning/locationsingleton.cpp
index 0b1a5d6d..4f675d26 100644
--- a/src/imports/positioning/locationsingleton.cpp
+++ b/src/imports/positioning/locationsingleton.cpp
@@ -44,13 +44,14 @@
/*!
\qmltype QtPositioning
\instantiates LocationSingleton
- \inqmlmodule QtPositioning 5.0
+ \inqmlmodule QtPositioning
+ \since 5.2
\brief The QtPositioning global object provides useful functions for working with location-based
types in QML.
\qml
- import QtPositioning 5.0
+ import QtPositioning 5.2
Item {
property variant coordinate: QtPositioning.coordinate(-27.5, 153.1)
diff --git a/src/imports/positioning/plugins.qmltypes b/src/imports/positioning/plugins.qmltypes
index 3f5b1ff7..23aeac08 100644
--- a/src/imports/positioning/plugins.qmltypes
+++ b/src/imports/positioning/plugins.qmltypes
@@ -3,14 +3,15 @@ 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 QtPositioning 5.0'.
+// This file was auto-generated by:
+// 'qmlplugindump -notrelocatable QtPositioning 5.2'
Module {
Component {
name: "GeoShapeValueType"
prototype: "QQmlValueType"
- exports: ["QtPositioning/GeoShape 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtPositioning/GeoShape 5.0", "QtPositioning/GeoShape 5.2"]
+ exportMetaObjectRevisions: [0, 0]
Enum {
name: "ShapeType"
values: {
@@ -31,8 +32,11 @@ Module {
Component {
name: "LocationSingleton"
prototype: "QObject"
- exports: ["QtPositioning/QtPositioning 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtPositioning/QtPositioning 5.0",
+ "QtPositioning/QtPositioning 5.2"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Method { name: "coordinate"; type: "QGeoCoordinate" }
Method {
name: "coordinate"
@@ -78,8 +82,8 @@ Module {
Component {
name: "QDeclarativeGeoAddress"
prototype: "QObject"
- exports: ["QtPositioning/Address 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtPositioning/Address 5.0", "QtPositioning/Address 5.2"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "address"; type: "QGeoAddress" }
Property { name: "text"; type: "string" }
Property { name: "country"; type: "string" }
@@ -95,8 +99,8 @@ Module {
Component {
name: "QDeclarativeGeoLocation"
prototype: "QObject"
- exports: ["QtPositioning/Location 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtPositioning/Location 5.0", "QtPositioning/Location 5.2"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "location"; type: "QGeoLocation" }
Property { name: "address"; type: "QDeclarativeGeoAddress"; isPointer: true }
Property { name: "coordinate"; type: "QGeoCoordinate" }
@@ -105,8 +109,8 @@ Module {
Component {
name: "QDeclarativePosition"
prototype: "QObject"
- exports: ["QtPositioning/Position 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtPositioning/Position 5.0", "QtPositioning/Position 5.2"]
+ exportMetaObjectRevisions: [0, 0]
Property { name: "latitudeValid"; type: "bool"; isReadonly: true }
Property { name: "longitudeValid"; type: "bool"; isReadonly: true }
Property { name: "altitudeValid"; type: "bool"; isReadonly: true }
@@ -122,8 +126,11 @@ Module {
Component {
name: "QDeclarativePositionSource"
prototype: "QObject"
- exports: ["QtPositioning/PositionSource 5.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtPositioning/PositionSource 5.0",
+ "QtPositioning/PositionSource 5.2"
+ ]
+ exportMetaObjectRevisions: [0, 0]
Enum {
name: "PositioningMethod"
values: {
@@ -147,7 +154,8 @@ Module {
values: {
"AccessError": 0,
"ClosedError": 1,
- "UnknownSourceError": -1
+ "UnknownSourceError": 2,
+ "SocketError": 100
}
}
Property { name: "position"; type: "QDeclarativePosition"; isReadonly: true; isPointer: true }
diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp
index b4bda5fd..9b4de734 100644
--- a/src/imports/positioning/positioning.cpp
+++ b/src/imports/positioning/positioning.cpp
@@ -93,20 +93,12 @@ class QLocationDeclarativeModule: public QQmlExtensionPlugin
public:
virtual void registerTypes(const char *uri)
{
- if (QLatin1String(uri) == QLatin1String("QtPositioning")) {
+ if (QLatin1String(uri) == QStringLiteral("QtPositioning")) {
// @uri QtPositioning 5.0
- qmlRegisterSingletonType<LocationSingleton>(uri, 5, 0, "QtPositioning", singleton_type_factory);
-
- QQml_addValueTypeProvider(getValueTypeProvider());
- qmlRegisterValueTypeEnums<GeoShapeValueType>(uri, 5, 0, "GeoShape");
-
- qmlRegisterType<QDeclarativePosition>(uri, 5, 0, "Position");
- qmlRegisterType<QDeclarativePositionSource>(uri, 5, 0, "PositionSource");
- qmlRegisterType<QDeclarativeGeoAddress>(uri, 5, 0, "Address");
-
- qmlRegisterType<QDeclarativeGeoLocation>(uri, 5, 0, "Location");
+ int major = 5;
+ int minor = 0;
qRegisterMetaType<QGeoCoordinate>("QGeoCoordinate");
qRegisterMetaType<QGeoAddress>("QGeoAddress");
@@ -115,6 +107,28 @@ public:
qRegisterMetaType<QGeoLocation>("QGeoLocation");
qRegisterAnimationInterpolator<QGeoCoordinate>(geoCoordinateInterpolator);
+ QQml_addValueTypeProvider(getValueTypeProvider());
+
+ // Register the 5.0 types
+ // 5.0 is silent and not advertised
+ qmlRegisterSingletonType<LocationSingleton >(uri, major, minor, "QtPositioning", singleton_type_factory);
+ qmlRegisterValueTypeEnums<GeoShapeValueType >(uri, major, minor, "GeoShape");
+ qmlRegisterType<QDeclarativePosition >(uri, major, minor, "Position");
+ qmlRegisterType<QDeclarativePositionSource >(uri, major, minor, "PositionSource");
+ qmlRegisterType<QDeclarativeGeoAddress >(uri, major, minor, "Address");
+ qmlRegisterType<QDeclarativeGeoLocation >(uri, major, minor, "Location");
+
+ // Register the 5.2 types
+ minor = 2;
+ qmlRegisterSingletonType<LocationSingleton >(uri, major, minor, "QtPositioning", singleton_type_factory);
+ qmlRegisterValueTypeEnums<GeoShapeValueType >(uri, major, minor, "GeoShape");
+ qmlRegisterType<QDeclarativePosition >(uri, major, minor, "Position");
+ qmlRegisterType<QDeclarativePositionSource >(uri, major, minor, "PositionSource");
+ qmlRegisterType<QDeclarativeGeoAddress >(uri, major, minor, "Address");
+ qmlRegisterType<QDeclarativeGeoLocation >(uri, major, minor, "Location");
+
+ // Register the 5.3 types
+ minor = 3;
qmlRegisterType<QDeclarativeGeoCoordinateAnimation>(uri, 5, 3, "CoordinateAnimation");
} else {
qDebug() << "Unsupported URI given to load positioning QML plugin: " << QLatin1String(uri);
diff --git a/src/imports/positioning/qdeclarativecoordinate.cpp b/src/imports/positioning/qdeclarativecoordinate.cpp
index 20dd5cef..5d876a43 100644
--- a/src/imports/positioning/qdeclarativecoordinate.cpp
+++ b/src/imports/positioning/qdeclarativecoordinate.cpp
@@ -45,9 +45,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlbasictype coordinate
- \inqmlmodule QtPositioning 5.0
+ \inqmlmodule QtPositioning
\ingroup qml-QtPositioning5-basictypes
- \since Qt Positioning 5.0
+ \since 5.2
\brief The coordinate type represents and stores a geographic position.
@@ -88,7 +88,7 @@ QT_BEGIN_NAMESPACE
function:
\qml
- import QtPositioning 5.0
+ import QtPositioning 5.2
Location { coordinate: QtPositioning.coordinate(-27.5, 153.1) }
\endqml
diff --git a/src/imports/positioning/qdeclarativegeocircle.cpp b/src/imports/positioning/qdeclarativegeocircle.cpp
index 4424d2d7..65448d57 100644
--- a/src/imports/positioning/qdeclarativegeocircle.cpp
+++ b/src/imports/positioning/qdeclarativegeocircle.cpp
@@ -50,9 +50,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlbasictype geocircle
- \inqmlmodule QtPositioning 5.0
+ \inqmlmodule QtPositioning
\ingroup qml-QtPositioning5-basictypes
- \since Qt Positioning 5.0
+ \since 5.2
\brief The geocircle type represents a circular geographic area.
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
use the \l {QtPositioning::circle}{QtPositioning.circle()} function:
\qml
- import QtPositioning 5.0
+ import QtPositioning 5.2
Item {
property variant region: QtPositioning.circle(QtPositioning.coordinate(-27.5, 153.1), 1000)
diff --git a/src/imports/positioning/qdeclarativegeorectangle.cpp b/src/imports/positioning/qdeclarativegeorectangle.cpp
index f1162b77..cf860fe0 100644
--- a/src/imports/positioning/qdeclarativegeorectangle.cpp
+++ b/src/imports/positioning/qdeclarativegeorectangle.cpp
@@ -50,9 +50,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlbasictype georectangle
- \inqmlmodule QtPositioning 5.0
+ \inqmlmodule QtPositioning
\ingroup qml-QtPositioning5-basictypes
- \since Qt Positioning 5.0
+ \since 5.2
\brief The georectangle type represents a rectangular geographic area.
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
value, use the \l {QtPositioning::rectangle}{QtPositioning.rectangle()} function:
\qml
- import QtPositioning 5.0
+ import QtPositioning 5.2
Item {
property variant region: QtPositioning.rectangle(QtPositioning.coordinate(-27.5, 153.1), QtPositioning.coordinate(-27.6, 153.2))
diff --git a/src/imports/positioning/qdeclarativegeoshape.cpp b/src/imports/positioning/qdeclarativegeoshape.cpp
index d79f5622..4c4d32cc 100644
--- a/src/imports/positioning/qdeclarativegeoshape.cpp
+++ b/src/imports/positioning/qdeclarativegeoshape.cpp
@@ -48,9 +48,9 @@ QT_BEGIN_NAMESPACE
/*!
\qmlbasictype geoshape
- \inqmlmodule QtPositioning 5.0
+ \inqmlmodule QtPositioning
\ingroup qml-QtPositioning5-basictypes
- \since Qt Positioning 5.0
+ \since 5.2
\brief A geoshape type represents an abstract geographic area.
@@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
or with the \l {QtPositioning::shape}{QtPositioning.shape()} function:
\qml
- import QtPositioning 5.0
+ import QtPositioning 5.2
Item {
property variant region: QtPositioning.shape()
diff --git a/src/imports/positioning/qdeclarativeposition.cpp b/src/imports/positioning/qdeclarativeposition.cpp
index bce1b1fa..51456e02 100644
--- a/src/imports/positioning/qdeclarativeposition.cpp
+++ b/src/imports/positioning/qdeclarativeposition.cpp
@@ -49,8 +49,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Position
\instantiates QDeclarativePosition
- \inqmlmodule QtPositioning 5.0
- \since Qt Positioning 5.0
+ \inqmlmodule QtPositioning
+ \since 5.2
\brief The Position type holds positional data at a particular point in time,
such as coordinate (longitude, latitude, altitude) and speed.
diff --git a/src/imports/positioning/qdeclarativepositionsource.cpp b/src/imports/positioning/qdeclarativepositionsource.cpp
index 00775010..da439511 100644
--- a/src/imports/positioning/qdeclarativepositionsource.cpp
+++ b/src/imports/positioning/qdeclarativepositionsource.cpp
@@ -55,8 +55,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype PositionSource
\instantiates QDeclarativePositionSource
- \inqmlmodule QtPositioning 5.0
- \since Qt Positioning 5.0
+ \inqmlmodule QtPositioning
+ \since 5.2
\brief The PositionSource type provides the device's current position.
@@ -111,7 +111,7 @@ QT_BEGIN_NAMESPACE
a PositionSource in your application to retrieve local data for users
from a REST web service.
- \sa {QtPositioning5::Position}, {QGeoPositionInfoSource}
+ \sa {QtPositioning::Position}, {QGeoPositionInfoSource}
*/
@@ -179,6 +179,8 @@ void QDeclarativePositionSource::setName(const QString &newName)
m_positionSource->setUpdateInterval(m_updateInterval);
m_positionSource->setPreferredPositioningMethods(
static_cast<QGeoPositionInfoSource::PositioningMethods>(int(m_preferredPositioningMethods)));
+
+ setPosition(m_positionSource->lastKnownPosition());
}
if (previousUpdateInterval != updateInterval())
@@ -263,6 +265,7 @@ void QDeclarativePositionSource::setNmeaSource(const QUrl &nmeaSource)
m_nmeaSocket = 0;
delete m_positionSource;
m_positionSource = 0;
+ setPosition(QGeoPositionInfo());
// Create the NMEA source based on the given data. QML has automatically set QUrl
// type to point to correct path. If the file is not found, check if the file actually
// was an embedded resource file.
@@ -280,6 +283,7 @@ void QDeclarativePositionSource::setNmeaSource(const QUrl &nmeaSource)
(qobject_cast<QNmeaPositionInfoSource *>(m_positionSource))->setDevice(m_nmeaFile);
connect(m_positionSource, SIGNAL(positionUpdated(QGeoPositionInfo)),
this, SLOT(positionUpdateReceived(QGeoPositionInfo)));
+ setPosition(m_positionSource->lastKnownPosition());
if (m_active && !m_singleUpdate) {
// Keep on updating even though source changed
QTimer::singleShot(0, this, SLOT(start()));
@@ -326,6 +330,8 @@ void QDeclarativePositionSource::socketConnected()
connect(m_positionSource, &QNmeaPositionInfoSource::positionUpdated,
this, &QDeclarativePositionSource::positionUpdateReceived);
+ setPosition(m_positionSource->lastKnownPosition());
+
if (m_active && !m_singleUpdate) {
// Keep on updating even though source changed
QTimer::singleShot(0, this, SLOT(start()));
@@ -362,6 +368,24 @@ void QDeclarativePositionSource::socketError(QAbstractSocket::SocketError error)
emit sourceErrorChanged();
}
+void QDeclarativePositionSource::setPosition(const QGeoPositionInfo &pi)
+{
+ if (pi.isValid()) {
+ m_position.setTimestamp(pi.timestamp());
+ m_position.setCoordinate(pi.coordinate());
+ if (pi.hasAttribute(QGeoPositionInfo::GroundSpeed))
+ m_position.setSpeed(pi.attribute(QGeoPositionInfo::GroundSpeed));
+ if (pi.hasAttribute(QGeoPositionInfo::HorizontalAccuracy))
+ m_position.setHorizontalAccuracy(pi.attribute(QGeoPositionInfo::HorizontalAccuracy));
+ if (pi.hasAttribute(QGeoPositionInfo::VerticalAccuracy))
+ m_position.setVerticalAccuracy(pi.attribute(QGeoPositionInfo::VerticalAccuracy));
+ } else {
+ m_position.invalidate();
+ }
+
+ emit positionChanged();
+}
+
/*!
\internal
*/
@@ -623,22 +647,8 @@ QDeclarativePosition *QDeclarativePositionSource::position()
void QDeclarativePositionSource::positionUpdateReceived(const QGeoPositionInfo &update)
{
- if (update.isValid()) {
- m_position.setTimestamp(update.timestamp());
- m_position.setCoordinate(update.coordinate());
- if (update.hasAttribute(QGeoPositionInfo::GroundSpeed)) {
- m_position.setSpeed(update.attribute(QGeoPositionInfo::GroundSpeed));
- }
- if (update.hasAttribute(QGeoPositionInfo::HorizontalAccuracy)) {
- m_position.setHorizontalAccuracy(update.attribute(QGeoPositionInfo::HorizontalAccuracy));
- }
- if (update.hasAttribute(QGeoPositionInfo::VerticalAccuracy)) {
- m_position.setVerticalAccuracy(update.attribute(QGeoPositionInfo::VerticalAccuracy));
- }
- emit positionChanged();
- } else {
- m_position.invalidate();
- }
+ setPosition(update);
+
if (m_singleUpdate && m_active) {
m_active = false;
m_singleUpdate = false;
@@ -686,6 +696,8 @@ void QDeclarativePositionSource::componentComplete()
m_positionSource->setUpdateInterval(m_updateInterval);
m_positionSource->setPreferredPositioningMethods(
static_cast<QGeoPositionInfoSource::PositioningMethods>(int(m_preferredPositioningMethods)));
+
+ setPosition(m_positionSource->lastKnownPosition());
}
if (previousUpdateInterval != updateInterval())
diff --git a/src/imports/positioning/qdeclarativepositionsource_p.h b/src/imports/positioning/qdeclarativepositionsource_p.h
index fc720301..bb229d5e 100644
--- a/src/imports/positioning/qdeclarativepositionsource_p.h
+++ b/src/imports/positioning/qdeclarativepositionsource_p.h
@@ -86,7 +86,8 @@ public:
AccessError = QGeoPositionInfoSource::AccessError,
ClosedError = QGeoPositionInfoSource::ClosedError,
UnknownSourceError = QGeoPositionInfoSource::UnknownSourceError,
- SocketError
+ //Leave a gap for future error enum values in QGeoPositionInfoSource::Error
+ SocketError = 100
};
Q_ENUMS(SourceError)
@@ -135,7 +136,10 @@ private Q_SLOTS:
void sourceErrorReceived(const QGeoPositionInfoSource::Error error);
void socketConnected();
void socketError(QAbstractSocket::SocketError error);
+
private:
+ void setPosition(const QGeoPositionInfo &pi);
+
QGeoPositionInfoSource *m_positionSource;
QDeclarativePosition m_position;
PositioningMethods m_preferredPositioningMethods;
diff --git a/src/location/doc/snippets/declarative/declarative-location.qml b/src/location/doc/snippets/declarative/declarative-location.qml
index 9b0efa42..b98de5a7 100644
--- a/src/location/doc/snippets/declarative/declarative-location.qml
+++ b/src/location/doc/snippets/declarative/declarative-location.qml
@@ -40,7 +40,7 @@
//![0]
import QtQuick 2.0
-import QtPositioning 5.0
+import QtPositioning 5.2
Rectangle {
id: page
diff --git a/src/location/doc/snippets/declarative/maps.qml b/src/location/doc/snippets/declarative/maps.qml
index eb5d5bc1..1a6d78fc 100644
--- a/src/location/doc/snippets/declarative/maps.qml
+++ b/src/location/doc/snippets/declarative/maps.qml
@@ -41,7 +41,7 @@
//! [QtQuick import]
import QtQuick 2.0
//! [QtQuick import]
-import QtPositioning 5.0
+import QtPositioning 5.2
//! [QtLocation import]
import QtLocation 5.0
//! [QtLocation import]
diff --git a/src/location/doc/snippets/declarative/places.qml b/src/location/doc/snippets/declarative/places.qml
index 862ab182..6f32ddaf 100644
--- a/src/location/doc/snippets/declarative/places.qml
+++ b/src/location/doc/snippets/declarative/places.qml
@@ -42,7 +42,7 @@
import QtQuick 2.0
//! [QtQuick import]
//! [QtLocation import]
-import QtPositioning 5.0
+import QtPositioning 5.2
import QtLocation 5.0
//! [QtLocation import]
diff --git a/src/location/doc/snippets/declarative/places_loader.qml b/src/location/doc/snippets/declarative/places_loader.qml
index 06301064..13bfc74b 100644
--- a/src/location/doc/snippets/declarative/places_loader.qml
+++ b/src/location/doc/snippets/declarative/places_loader.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import QtPositioning 5.0
+import QtPositioning 5.2
import QtLocation 5.0
Rectangle {
diff --git a/src/location/doc/src/examples/declarative-mapviewer.qdoc b/src/location/doc/src/examples/declarative-mapviewer.qdoc
index 6fbec0e9..ff7ff7db 100644
--- a/src/location/doc/src/examples/declarative-mapviewer.qdoc
+++ b/src/location/doc/src/examples/declarative-mapviewer.qdoc
@@ -38,8 +38,8 @@
covering each of these areas of functionality with snippets from the code.
The Map Viewer example can work with any of the available geo services plugins. However, some
- plugins may require additional \l {QtLocation5::PluginParameter}{plugin parameters} in order to
- function correctly. \l {QtLocation5::PluginParameter}{Plugin parameters} can be passed on the
+ plugins may require additional \l {QtLocation::PluginParameter}{plugin parameters} in order to
+ function correctly. \l {QtLocation::PluginParameter}{Plugin parameters} can be passed on the
command line using the \c {--plugin} argument, which takes the form:
\code
@@ -55,20 +55,20 @@
\list
\li Displaying a map
\list
- \li \l{QtLocation5::Map}{Map}
- \li \l{QtLocation5::MapGestureArea}{MapGestureArea}
+ \li \l{QtLocation::Map}{Map}
+ \li \l{QtLocation::MapGestureArea}{MapGestureArea}
\li \l{coordinate}
\endlist
\li Finding an address
\list
- \li \l{QtLocation5::GeocodeModel}{GeocodeModel}
- \li \l{QtLocation5::MapItemView}{MapItemView}
- \li \l{QtLocation5::MapCircle}{MapCircle}
+ \li \l{QtLocation::GeocodeModel}{GeocodeModel}
+ \li \l{QtLocation::MapItemView}{MapItemView}
+ \li \l{QtLocation::MapCircle}{MapCircle}
\endlist
\li Directions and travel routes
\list
- \li \l{QtLocation5::RouteModel}{RouteModel}
- \li \l{QtLocation5::MapRoute}{MapRoute}
+ \li \l{QtLocation::RouteModel}{RouteModel}
+ \li \l{QtLocation::MapRoute}{MapRoute}
\endlist
\endlist
@@ -186,7 +186,7 @@
\snippet mapviewer/content/map/MapComponent.qml routeinfomodel
Inside the RouteModel, we add an
- \l{QtLocation5::RouteModel::status}{onStatusChanged} handler, which
+ \l{QtLocation::RouteModel::status}{onStatusChanged} handler, which
calls the \c{update()} function we defined on the model:
\snippet mapviewer/content/map/MapComponent.qml routemodel1
diff --git a/src/location/doc/src/examples/declarative-places.qdoc b/src/location/doc/src/examples/declarative-places.qdoc
index 30848740..f73d2bee 100644
--- a/src/location/doc/src/examples/declarative-places.qdoc
+++ b/src/location/doc/src/examples/declarative-places.qdoc
@@ -61,8 +61,8 @@
from the "New" menu and fill in the fields. Click "Go!" to save the category.
The Places example can work with any of the available geo services plugins. However, some
- plugins may require additional \l {QtLocation5::PluginParameter}{plugin parameters} in order to
- function correctly. \l {QtLocation5::PluginParameter}{Plugin parameters} can be passed on the
+ plugins may require additional \l {QtLocation::PluginParameter}{plugin parameters} in order to
+ function correctly. \l {QtLocation::PluginParameter}{Plugin parameters} can be passed on the
command line using the \c {--plugin} argument, which takes the form:
\code
diff --git a/src/location/doc/src/maps.qdoc b/src/location/doc/src/maps.qdoc
index a97f28f9..a9816f52 100644
--- a/src/location/doc/src/maps.qdoc
+++ b/src/location/doc/src/maps.qdoc
@@ -47,26 +47,26 @@ A more hands-on introduction of the Maps and Navigation types can be found in th
\section2 Displaying Maps
-Displaying a map is done using the \l{QtLocation5::Map}{Map} QML types. The Map type supports
-user interaction through the \l{QtLocation5::MapGestureArea}{MapGestureArea} QML type. The Map
+Displaying a map is done using the \l{QtLocation::Map}{Map} QML types. The Map type supports
+user interaction through the \l{QtLocation::MapGestureArea}{MapGestureArea} QML type. The Map
object draws the map on-screen using OpenGL (ES), allowing for hardware-accelerated rendering
where available.
\b{Key Types}
\table
\row
- \li \l{QtLocation5::Plugin}{Plugin}
+ \li \l{QtLocation::Plugin}{Plugin}
\li A location-based services plugin provides data including map data which is then displayed in a Map object.
\row
- \li \l{QtLocation5::Map}{Map}
+ \li \l{QtLocation::Map}{Map}
\li QtQuick item to display a map on-screen.
\row
- \li \l{QtLocation5::MapGestureArea}{MapGestureArea}
+ \li \l{QtLocation::MapGestureArea}{MapGestureArea}
\li Interaction helper for panning, flicking and pinch-to-zoom gesture on a Map.
\endtable
-Note that the client must create a \l{QtLocation5::Plugin}{Plugin} object
-prior to using a \l{QtLocation5::Map}{Map} type in order to have access
+Note that the client must create a \l{QtLocation::Plugin}{Plugin} object
+prior to using a \l{QtLocation::Map}{Map} type in order to have access
to map data to display.
\section2 Putting Objects on a Map (Map Overlay Objects)
@@ -74,47 +74,47 @@ to map data to display.
Maps can also contain map overlay objects, which are used to display information
on its surface. There is a set of basic pre-defined map overlay objects, as well
as the ability to implement custom map overlay objects using the
-\l{QtLocation5::MapQuickItem}{MapQuickItem} type, which can contain any
+\l{QtLocation::MapQuickItem}{MapQuickItem} type, which can contain any
standard QtQuick item.
\b{Key Types}
\table
\row
- \li \l{QtLocation5::MapCircle}{MapCircle}
+ \li \l{QtLocation::MapCircle}{MapCircle}
\li A geographic circle (all points at a set distance from a center), optionally with a border.
\row
- \li \l{QtLocation5::MapRectangle}{MapRectangle}
+ \li \l{QtLocation::MapRectangle}{MapRectangle}
\li A rectangle whose top left and bottom right points are specified as
\l {coordinate} types, optionally with a border.
\row
- \li \l{QtLocation5::MapPolygon}{MapPolygon}
+ \li \l{QtLocation::MapPolygon}{MapPolygon}
\li A polygon made of an arbitrary list of \l {coordinate}{coordinates}.
\row
- \li \l{QtLocation5::MapPolyline}{MapPolyline}
+ \li \l{QtLocation::MapPolyline}{MapPolyline}
\li A polyline made of an arbitrary list of \l {coordinate}{coordinates}.
\row
- \li \l{QtLocation5::MapQuickItem}{MapQuickItem}
+ \li \l{QtLocation::MapQuickItem}{MapQuickItem}
\li Turns any arbitrary QtQuick Item into a map overlay object. MapQuickItem is an enabler for specifying custom map overlay objects.
\endtable
\section2 Model-View Design with Map Overlay Objects
To automatically generate map overlay objects based on the contents of a QtQuick
-model (for example a ListModel item), the \l{QtLocation5::MapItemView}{MapItemView}
+model (for example a ListModel item), the \l{QtLocation::MapItemView}{MapItemView}
type is available. It accepts any map overlay object as its delegate, and can
-only be created within a \l{QtLocation5::Map}{Map}.
+only be created within a \l{QtLocation::Map}{Map}.
\b{Key Types}
\table
\row
- \li \l{QtLocation5::MapItemView}{MapItemView}
+ \li \l{QtLocation::MapItemView}{MapItemView}
\li Populates a Map with map overlay objects based on the data provided by a model.
\endtable
\section2 Interaction with Map Overlay Objects
Interaction with the pre-defined map overlay object types is done using the
-\l{QtLocation5::MapMouseArea}{MapMouseArea} type, which behaves much like a
+\l{QtLocation::MapMouseArea}{MapMouseArea} type, which behaves much like a
normal QtQuick MouseArea. MapQuickItems can also contain MapMouseArea objects,
but can additionally use normal QtQuick MouseAreas to provide interaction.
@@ -126,10 +126,10 @@ available.
\b{Key Types}
\table
\row
- \li \l{QtLocation5::MapMouseArea}{MapMouseArea}
+ \li \l{QtLocation::MapMouseArea}{MapMouseArea}
\li Accepts mouse events for a pre-defined map overlay object (for example MapCircle).
\row
- \li \l{QtLocation5::MapMouseEvent}{MapMouseEvent}
+ \li \l{QtLocation::MapMouseEvent}{MapMouseEvent}
\li Provides additional information unique to mouse events on a Map.
\endtable
@@ -138,16 +138,16 @@ available.
Geocoding is the translation of geographic coordinates into addresses, or vice
versa. Such a translation usually involves sending the source data to a server
which then performs the translation and returns the results, although some
-location-based service provider \l{QtLocation5::Plugin}{plugins} may be able to
+location-based service provider \l{QtLocation::Plugin}{plugins} may be able to
provide some geocoding functionality without sending data to a remote server.
The availability and accuracy of the translation usually depends on the location
or address being translated, as different areas of the Earth are mapped to
varying degrees of accuracy.
A geocoding query in QML is performed using the
-\l{QtLocation5::GeocodeModel}{GeocodeModel} type. For an address-to-coordinate
+\l{QtLocation::GeocodeModel}{GeocodeModel} type. For an address-to-coordinate
query, its \c{query} property may be set to either an
-\l{QtPositioning5::Address}{Address} object or a string containing the textual
+\l{QtPositioning::Address}{Address} object or a string containing the textual
form of the address to search for. To perform the reverse, the same property
can be set to a \l {coordinate} instead. Results are made available in the
contents of the model.
@@ -155,18 +155,18 @@ contents of the model.
\b{Key Types}
\table
\row
- \li \l{QtLocation5::Plugin}{Plugin}
+ \li \l{QtLocation::Plugin}{Plugin}
\li A location-based services plugin provides data including geocoding translation results which are exposed to clients via a GeocodeModel.
\row
- \li \l{QtLocation5::GeocodeModel}{GeocodeModel}
+ \li \l{QtLocation::GeocodeModel}{GeocodeModel}
\li Queries the Plugin for geocoding translations and provides access to results via indexes in the model.
\row
- \li \l{QtPositioning5::Address}{Address}
+ \li \l{QtPositioning::Address}{Address}
\li Structured address for use in queries and results of geocoding.
\endtable
-Note that the client must create a \l{QtLocation5::Plugin}{Plugin} object
-prior to using a \l{QtLocation5::GeocodeModel}{GeocodeModel} object. This
+Note that the client must create a \l{QtLocation::Plugin}{Plugin} object
+prior to using a \l{QtLocation::GeocodeModel}{GeocodeModel} object. This
will enable access to geocoding translation services and thus data to display.
\section1 Routing and Navigation
@@ -181,16 +181,16 @@ between the segments.
\b{Key Types}
\table
\row
- \li \l{QtLocation5::Route}{Route}
+ \li \l{QtLocation::Route}{Route}
\li The entire path to be navigated.
\row
- \li \l{QtLocation5::RouteSegment}{RouteSegment}
+ \li \l{QtLocation::RouteSegment}{RouteSegment}
\li The individual components of a route.
\row
- \li \l{QtLocation5::RouteManeuver}{RouteManeuver}
+ \li \l{QtLocation::RouteManeuver}{RouteManeuver}
\li The navigation information that joins segments.
\row
- \li \l{QtLocation5::RouteModel}{RouteModel}
+ \li \l{QtLocation::RouteModel}{RouteModel}
\li The means of making requests on the backend to supply route
information.
\endtable
diff --git a/src/location/doc/src/qml-maps.qdoc b/src/location/doc/src/qml-maps.qdoc
index f63cc5a4..84ccfbf4 100644
--- a/src/location/doc/src/qml-maps.qdoc
+++ b/src/location/doc/src/qml-maps.qdoc
@@ -60,7 +60,7 @@ The basic piece of position information is the \l {coordinate}. A
coordinate encapsulates data for the latitude, longitude and altitude of the location. Altitude is
in meters. It also has a method to determine distance to another
\l {coordinate}. The \l {coordinate} type may
-also be held within a \l {QtPositioning5::Location}{Location} element, this will also have information
+also be held within a \l {QtPositioning::Location}{Location} element, this will also have information
on a bounding box size to determine sufficient proximity to the location and a location address.
@@ -70,7 +70,7 @@ to center a \l{Map}{map} on the current position:
\code
Rectangle {
- import QtPositioning 5.0
+ import QtPositioning 5.2
import QtLocation 5.0
...
@@ -216,7 +216,7 @@ Enabling and configuring pinch and flickable is easy within the \l Map type.
Zoom can also be controlled by other objects like sliders, as shown in the
example, by implementing the \c onValueChanged handler to update the Map
-\l {QtLocation5::Map::}{zoomLevel}.
+\l {QtLocation::Map::}{zoomLevel}.
\section1 Types
diff --git a/src/location/doc/src/qtlocation-qml.qdoc b/src/location/doc/src/qtlocation-qml.qdoc
index a24820bd..ed280dfb 100644
--- a/src/location/doc/src/qtlocation-qml.qdoc
+++ b/src/location/doc/src/qtlocation-qml.qdoc
@@ -41,14 +41,14 @@ statement in the QML file.
\section2 Location QML Concepts
Provided that a position has been obtained this module can
-add a \l {QtLocation5::Map}{Map} with positions of interest and
-\l {QtLocation5::Place}{Places}. The user can be made aware of nearby features and related
+add a \l {QtLocation::Map}{Map} with positions of interest and
+\l {QtLocation::Place}{Places}. The user can be made aware of nearby features and related
information, displayed graphically. Features on the \l Map may be places of business, entertainment
and so on. They may include paths, roads, or forms of transport leading so that
navigation optimization and assistance are possible.
To perform navigation we need \l {Route}s from start to destination. These routes
-are made up of segments. Each \l {QtLocation5::RouteSegment}{RouteSegment}
+are made up of segments. Each \l {QtLocation::RouteSegment}{RouteSegment}
can be considered a navigation sub-task: drive 100 meters, turn left. The beginning and
end of each segment is a \e waypoint, that is, one part of our journey.
diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp
index 050e7fc3..32bbae36 100644
--- a/src/location/maps/qgeocameratiles.cpp
+++ b/src/location/maps/qgeocameratiles.cpp
@@ -53,6 +53,7 @@
#include <QDebug>
+#include <algorithm>
#include <cmath>
QT_BEGIN_NAMESPACE
@@ -413,6 +414,74 @@ void QGeoCameraTilesPrivate::appendZIntersects(const QDoubleVector3D &start,
}
}
+/***************************************************/
+/* Local copy of qSort & qSortHelper to suppress deprecation warnings
+ * following the deprecation of QtAlgorithms. The comparison has subtle
+ * differences which eluded detection so far. We just reuse old qSort for now.
+ **/
+
+template <typename RandomAccessIterator, typename LessThan>
+inline void localqSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
+{
+ if (start != end)
+ localqSortHelper(start, end, *start, lessThan);
+}
+
+template <typename RandomAccessIterator, typename T, typename LessThan>
+void localqSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan)
+{
+top:
+ int span = int(end - start);
+ if (span < 2)
+ return;
+
+ --end;
+ RandomAccessIterator low = start, high = end - 1;
+ RandomAccessIterator pivot = start + span / 2;
+
+ if (lessThan(*end, *start))
+ qSwap(*end, *start);
+ if (span == 2)
+ return;
+
+ if (lessThan(*pivot, *start))
+ qSwap(*pivot, *start);
+ if (lessThan(*end, *pivot))
+ qSwap(*end, *pivot);
+ if (span == 3)
+ return;
+
+ qSwap(*pivot, *end);
+
+ while (low < high) {
+ while (low < high && lessThan(*low, *end))
+ ++low;
+
+ while (high > low && lessThan(*end, *high))
+ --high;
+
+ if (low < high) {
+ qSwap(*low, *high);
+ ++low;
+ --high;
+ } else {
+ break;
+ }
+ }
+
+ if (lessThan(*low, *end))
+ ++low;
+
+ qSwap(*end, *low);
+ localqSortHelper(start, low, t, lessThan);
+
+ start = low + 1;
+ ++end;
+ goto top;
+}
+/***************************************************/
+
+
// Returns the intersection of the plane of the map and the camera frustum as a right handed polygon
Polygon QGeoCameraTilesPrivate::frustumFootprint(const Frustum &frustum) const
{
@@ -443,7 +512,8 @@ Polygon QGeoCameraTilesPrivate::frustumFootprint(const Frustum &frustum) const
// - initial sort to remove duplicates
sorter.base = points.first();
- qSort(points.begin(), points.end(), sorter);
+ localqSort(points.begin(), points.end(), sorter);
+ //std::sort(points.begin(), points.end(), sorter);
for (int i = points.size() - 1; i > 0; --i) {
if (points.at(i) == points.at(i - 1))
points.remove(i);
@@ -457,7 +527,7 @@ Polygon QGeoCameraTilesPrivate::frustumFootprint(const Frustum &frustum) const
for (i = points.begin(); i != points.end(); ++i) {
sorter.base = *i;
if (i + 1 != points.end())
- qSort(i + 1, points.end(), sorter);
+ std::sort(i + 1, points.end(), sorter) ;
}
// - determine if what we have is right handed
diff --git a/src/plugins/position/geoclue/qgeocluemaster.cpp b/src/plugins/position/geoclue/qgeocluemaster.cpp
index 7f34f9ab..7e05564d 100644
--- a/src/plugins/position/geoclue/qgeocluemaster.cpp
+++ b/src/plugins/position/geoclue/qgeocluemaster.cpp
@@ -77,8 +77,15 @@ QGeoclueMaster::~QGeoclueMaster()
releaseMasterClient();
}
+bool QGeoclueMaster::hasMasterClient() const
+{
+ return m_client && m_masterPosition;
+}
+
bool QGeoclueMaster::createMasterClient(GeoclueAccuracyLevel accuracy, GeoclueResourceFlags resourceFlags)
{
+ Q_ASSERT(!m_client && !m_masterPosition);
+
GeoclueMaster *master = geoclue_master_get_default();
if (!master) {
qCritical("QGeoclueMaster error creating GeoclueMaster");
diff --git a/src/plugins/position/geoclue/qgeocluemaster.h b/src/plugins/position/geoclue/qgeocluemaster.h
index f48ecb7e..231701dc 100644
--- a/src/plugins/position/geoclue/qgeocluemaster.h
+++ b/src/plugins/position/geoclue/qgeocluemaster.h
@@ -54,6 +54,7 @@ public:
QGeoclueMaster(QObject *handler);
virtual ~QGeoclueMaster();
+ bool hasMasterClient() const;
bool createMasterClient(GeoclueAccuracyLevel accuracy, GeoclueResourceFlags resourceFlags);
void releaseMasterClient();
diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
index d6269858..1a062431 100644
--- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
+++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster.cpp
@@ -43,7 +43,10 @@
#include "qgeopositioninfosource_geocluemaster_p.h"
-#include <QtCore>
+#include <QtCore/QDateTime>
+#include <QtCore/QFile>
+#include <QtCore/QSaveFile>
+#include <QtCore/QStandardPaths>
#ifdef Q_LOCATION_GEOCLUE_DEBUG
#include <QDebug>
@@ -125,8 +128,18 @@ static void position_callback (GeocluePosition *pos,
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(0),
- m_lastPositionFromSatellite(false), m_methods(AllPositioningMethods)
+ m_lastPositionFromSatellite(false), m_methods(AllPositioningMethods), m_running(false)
{
+#ifndef QT_NO_DATASTREAM
+ // Load the last known location
+ QFile file(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
+ QStringLiteral("/qtposition-geoclue"));
+ if (file.open(QIODevice::ReadOnly)) {
+ QDataStream out(&file);
+ out >> m_lastPosition;
+ }
+#endif
+
m_requestTimer.setSingleShot(true);
QObject::connect(&m_requestTimer, SIGNAL(timeout()), this, SLOT(requestUpdateTimeout()));
QObject::connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(startUpdatesTimeout()));
@@ -134,6 +147,19 @@ QGeoPositionInfoSourceGeoclueMaster::QGeoPositionInfoSourceGeoclueMaster(QObject
QGeoPositionInfoSourceGeoclueMaster::~QGeoPositionInfoSourceGeoclueMaster()
{
+#ifndef QT_NO_DATASTREAM
+ if (m_lastPosition.isValid()) {
+ QSaveFile file(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
+ QStringLiteral("/qtposition-geoclue"));
+ if (file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
+ QDataStream out(&file);
+ // Only save position and timestamp.
+ out << QGeoPositionInfo(m_lastPosition.coordinate(), m_lastPosition.timestamp());
+ file.commit();
+ }
+ }
+#endif
+
if (m_pos)
g_object_unref (m_pos);
if (m_vel)
@@ -168,6 +194,12 @@ void QGeoPositionInfoSourceGeoclueMaster::singleUpdateFailed()
m_requestTimer.stop();
// Send timeout even if time wasn't up yet, because we are not trying again
emit updateTimeout();
+
+ // Only stop positioning if regular updates not active.
+ if (!m_running) {
+ cleanupPositionSource();
+ releaseMasterClient();
+ }
}
void QGeoPositionInfoSourceGeoclueMaster::singleUpdateSucceeded(GeocluePositionFields fields,
@@ -188,6 +220,12 @@ void QGeoPositionInfoSourceGeoclueMaster::singleUpdateSucceeded(GeocluePositionF
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()
@@ -233,18 +271,7 @@ bool QGeoPositionInfoSourceGeoclueMaster::init()
{
g_type_init ();
- return configurePositionSource(GEOCLUE_ACCURACY_LEVEL_NONE, GEOCLUE_RESOURCE_ALL);
-}
-
-bool QGeoPositionInfoSourceGeoclueMaster::configurePositionSource(GeoclueAccuracyLevel accuracy,
- GeoclueResourceFlags resourceFlags)
-{
- // Free potential previous sources, because new requirements can't be set for the client
- // (creating a position object after changing requirements seems to fail).
- cleanupPositionSource();
- releaseMasterClient();
-
- return createMasterClient(accuracy, resourceFlags);
+ return true;
}
void QGeoPositionInfoSourceGeoclueMaster::cleanupPositionSource()
@@ -277,27 +304,26 @@ void QGeoPositionInfoSourceGeoclueMaster::setPreferredPositioningMethods(Positio
if (previousPreferredPositioningMethods == preferredPositioningMethods())
return;
- switch (preferredPositioningMethods()) {
- case SatellitePositioningMethods:
- configurePositionSource(GEOCLUE_ACCURACY_LEVEL_DETAILED, GEOCLUE_RESOURCE_GPS);
- break;
- case NonSatellitePositioningMethods:
- configurePositionSource(GEOCLUE_ACCURACY_LEVEL_NONE, GeoclueResourceFlags(GEOCLUE_RESOURCE_CELL | GEOCLUE_RESOURCE_NETWORK));
- break;
- case AllPositioningMethods:
- configurePositionSource(GEOCLUE_ACCURACY_LEVEL_NONE, GEOCLUE_RESOURCE_ALL);
- break;
- default:
- qWarning("GeoPositionInfoSourceGeoClueMaster unknown preferred method.");
- return;
- }
-
#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster requested to set methods to, and set them to: " << methods;
+ qDebug() << "QGeoPositionInfoSourceGeoclueMaster requested to set methods to" << methods
+ << ", and set them to:" << preferredPositioningMethods();
#endif
m_lastPositionIsFresh = false;
m_lastVelocityIsFresh = false;
+
+ // Don't start Geoclue provider until necessary. Don't currently have a master client, no need
+ // no recreate one.
+ if (!hasMasterClient())
+ return;
+
+ // Free potential previous sources, because new requirements can't be set for the client
+ // (creating a position object after changing requirements seems to fail).
+ cleanupPositionSource();
+ releaseMasterClient();
+
+ // Restart Geoclue provider with new requirements.
+ configurePositionSource();
}
QGeoPositionInfo QGeoPositionInfoSourceGeoclueMaster::lastKnownPosition(bool fromSatellitePositioningMethodsOnly) const
@@ -319,23 +345,30 @@ QGeoPositionInfoSourceGeoclueMaster::PositioningMethods QGeoPositionInfoSourceGe
void QGeoPositionInfoSourceGeoclueMaster::startUpdates()
{
- if (m_updateTimer.isActive()) {
+ if (m_running) {
#ifdef Q_LOCATION_GEOCLUE_DEBUG
- qDebug() << "QGeoPositionInfoSourceGeoclueMaster timer was active, ignoring startUpdates: " << m_updateInterval;
+ qDebug() << "QGeoPositionInfoSourceGeoclueMaster already running";
#endif
return;
}
- if (!m_pos) {
- // May happen if source has been changed unsuccesfully
- emit updateTimeout();
- return;
- }
+
+ m_running = true;
+
+ // Start Geoclue provider.
+ 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);
}
+
+ // 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) {
@@ -350,18 +383,28 @@ int QGeoPositionInfoSourceGeoclueMaster::minimumUpdateInterval() const {
void QGeoPositionInfoSourceGeoclueMaster::stopUpdates()
{
+ if (!m_running)
+ return;
+
if (m_updateTimer.isActive())
m_updateTimer.stop();
- if (m_pos) {
+ if (m_pos)
g_signal_handlers_disconnect_by_func(G_OBJECT(m_pos), (void *)position_changed, this);
- } if (m_vel) {
+ if (m_vel)
g_signal_handlers_disconnect_by_func(G_OBJECT(m_vel), (void *)velocity_changed, this);
+
+ m_running = false;
+
+ // Only stop positioning if single update not requested.
+ if (!m_requestTimer.isActive()) {
+ cleanupPositionSource();
+ releaseMasterClient();
}
}
void QGeoPositionInfoSourceGeoclueMaster::requestUpdate(int timeout)
{
- if ((timeout < minimumUpdateInterval() && timeout != 0) || !m_pos) {
+ if (timeout < minimumUpdateInterval() && timeout != 0) {
emit updateTimeout();
return;
}
@@ -371,14 +414,17 @@ void QGeoPositionInfoSourceGeoclueMaster::requestUpdate(int timeout)
#endif
return;
}
+
+ if (!hasMasterClient())
+ configurePositionSource();
+
// Create better logic for timeout value (specs leave it impl dependant).
// Especially if there are active updates ongoing, there is no point of waiting
// for whole cold start time.
- if (timeout == 0)
- m_requestTimer.start(UPDATE_TIMEOUT_COLD_START);
- else
- m_requestTimer.start(timeout);
- geoclue_position_get_position_async (m_pos, (GeocluePositionCallback)position_callback,this);
+ m_requestTimer.start(timeout ? timeout : UPDATE_TIMEOUT_COLD_START);
+
+ if (m_pos)
+ geoclue_position_get_position_async(m_pos, position_callback, this);
}
void QGeoPositionInfoSourceGeoclueMaster::requestUpdateTimeout()
@@ -411,24 +457,38 @@ void QGeoPositionInfoSourceGeoclueMaster::positionProviderChanged(const QByteArr
m_pos = geoclue_position_new(service.constData(), path.constData());
if (m_pos) {
- if (m_updateTimer.isActive())
+ if (m_running) {
g_signal_connect(G_OBJECT(m_pos), "position-changed",
G_CALLBACK(position_changed), this);
+ }
// Get the current position immediately.
geoclue_position_get_position_async(m_pos, position_callback, this);
m_vel = geoclue_velocity_new(service.constData(), path.constData());
- if (m_vel && m_updateTimer.isActive())
+ if (m_vel && m_running) {
g_signal_connect(G_OBJECT(m_vel), "velocity-changed",
G_CALLBACK(velocity_changed), this);
- } else {
- m_updateTimer.stop();
- m_requestTimer.stop();
- emit updateTimeout();
+ }
}
}
+bool QGeoPositionInfoSourceGeoclueMaster::configurePositionSource()
+{
+ switch (preferredPositioningMethods()) {
+ case SatellitePositioningMethods:
+ return createMasterClient(GEOCLUE_ACCURACY_LEVEL_DETAILED, GEOCLUE_RESOURCE_GPS);
+ case NonSatellitePositioningMethods:
+ return createMasterClient(GEOCLUE_ACCURACY_LEVEL_NONE, GeoclueResourceFlags(GEOCLUE_RESOURCE_CELL | GEOCLUE_RESOURCE_NETWORK));
+ case AllPositioningMethods:
+ return createMasterClient(GEOCLUE_ACCURACY_LEVEL_NONE, GEOCLUE_RESOURCE_ALL);
+ default:
+ qWarning("GeoPositionInfoSourceGeoClueMaster unknown preferred method.");
+ }
+
+ return false;
+}
+
// Helper function to convert data into a QGeoPositionInfo
QGeoPositionInfo QGeoPositionInfoSourceGeoclueMaster::geoclueToPositionInfo(
GeocluePositionFields fields,
diff --git a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h
index ff351b6a..9c24f87f 100644
--- a/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h
+++ b/src/plugins/position/geoclue/qgeopositioninfosource_geocluemaster_p.h
@@ -69,13 +69,6 @@ class QGeoPositionInfoSourceGeoclueMaster : public QGeoPositionInfoSource, publi
{
Q_OBJECT
public:
- void positionChanged(GeocluePosition *position,
- GeocluePositionFields fields,
- int timestamp,
- double latitude,
- double longitude,
- double altitude,
- GeoclueAccuracy *accuracy);
QGeoPositionInfoSourceGeoclueMaster(QObject *parent = 0);
~QGeoPositionInfoSourceGeoclueMaster();
@@ -117,7 +110,7 @@ private slots:
void positionProviderChanged(const QByteArray &service, const QByteArray &path);
private:
- bool configurePositionSource(GeoclueAccuracyLevel accuracy, GeoclueResourceFlags resourceFlags);
+ bool configurePositionSource();
void cleanupPositionSource();
QGeoPositionInfo geoclueToPositionInfo(GeocluePositionFields fields,
int timestamp,
@@ -137,6 +130,7 @@ private:
bool m_lastPositionFromSatellite;
QGeoPositionInfo m_lastPosition;
PositioningMethods m_methods;
+ bool m_running;
};
QT_END_NAMESPACE
diff --git a/src/positioning/doc/snippets/doc_src_qtpositioning.qml b/src/positioning/doc/snippets/doc_src_qtpositioning.qml
index cc9547b7..c1e910bc 100644
--- a/src/positioning/doc/snippets/doc_src_qtpositioning.qml
+++ b/src/positioning/doc/snippets/doc_src_qtpositioning.qml
@@ -39,7 +39,7 @@
****************************************************************************/
//! [import]
-import QtPositioning 5.0
+import QtPositioning 5.2
//! [import]
Item {
diff --git a/src/positioning/doc/src/cpp-qml-positioning.qdoc b/src/positioning/doc/src/cpp-qml-positioning.qdoc
index 4ccd8510..55eeaff9 100644
--- a/src/positioning/doc/src/cpp-qml-positioning.qdoc
+++ b/src/positioning/doc/src/cpp-qml-positioning.qdoc
@@ -33,7 +33,7 @@
\section2 Address - QGeoAddress
\target geoaddress
-The \l {QtPositioning5::Address::address} {Address.address} property is used to provide an interface between C++ and QML code. First a pointer to a
+The \l {QtPositioning::Address::address} {Address.address} property is used to provide an interface between C++ and QML code. First a pointer to a
Address object must be obtained from C++, then use the \l {QObject::property()}{property()} and
\l {QObject::setProperty()}{setProperty()} functions to get and set the \c address property.
The following gets the QGeoAddress representing this object from C++:
diff --git a/src/positioning/doc/src/examples/declarative-flickr.qdoc b/src/positioning/doc/src/examples/declarative-flickr.qdoc
index c68797b0..46cc8d22 100644
--- a/src/positioning/doc/src/examples/declarative-flickr.qdoc
+++ b/src/positioning/doc/src/examples/declarative-flickr.qdoc
@@ -39,7 +39,7 @@
Key QML types shown in this example:
\list
- \li \l{QtPositioning5::PositionSource}{PositionSource}
+ \li \l{QtPositioning::PositionSource}{PositionSource}
\li \l{XmlListModel}{XmlListModel}
\endlist
diff --git a/src/positioning/doc/src/qtpositioning-qml.qdoc b/src/positioning/doc/src/qtpositioning-qml.qdoc
index ba35cb89..a5173662 100644
--- a/src/positioning/doc/src/qtpositioning-qml.qdoc
+++ b/src/positioning/doc/src/qtpositioning-qml.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtPositioning 5.0
+ \qmlmodule QtPositioning 5.2
\title Qt Positioning QML Types
\ingroup qmlmodules
\brief Provides QML types for position information
@@ -46,7 +46,7 @@ the longitude, and the altitude in meters. For more information see
\l {http://en.wikipedia.org/wiki/Geographic_coordinate}{Geographic Coordinate}.
The QML position is stored in a \l {coordinate} which contains the
-latitude, longitude and altitude of the device. The \l {QtPositioning5::Location}{Location} contains
+latitude, longitude and altitude of the device. The \l {QtPositioning::Location}{Location} contains
this \l {coordinate} and adds an address, it also has a bounding box which
defines the recommended viewing region when displaying the location.
diff --git a/src/positioning/doc/src/qtpositioning.qdoc b/src/positioning/doc/src/qtpositioning.qdoc
index 449b2de5..ea353942 100644
--- a/src/positioning/doc/src/qtpositioning.qdoc
+++ b/src/positioning/doc/src/qtpositioning.qdoc
@@ -38,9 +38,7 @@
To load the Qt Positioning module, add the following statement to your .qml files
- \code
- import QtPositioning 5.0
- \endcode
+ \snippet doc_src_qtpositioning.qml import
For C++ projects include the header appropriate for the current use case,
for example applications using routes may use
@@ -78,9 +76,7 @@ can be performed.
To load the Qt Positioning module, add the following statement to your .qml files
-\code
- import QtPositioning 5.0
-\endcode
+\snippet doc_src_qtpositioning.qml import
For C++ projects include the header appropriate for the current use case,
for example applications using routes may use
diff --git a/src/positioning/qdeclarativegeoaddress.cpp b/src/positioning/qdeclarativegeoaddress.cpp
index d061db10..6d14e48f 100644
--- a/src/positioning/qdeclarativegeoaddress.cpp
+++ b/src/positioning/qdeclarativegeoaddress.cpp
@@ -46,8 +46,8 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Address
\instantiates QDeclarativeGeoAddress
- \inqmlmodule QtPositioning 5.0
- \since Qt Positioning 5.0
+ \inqmlmodule QtPositioning
+ \since 5.2
\brief The Address QML type represents a specific location as a street address.
@@ -99,7 +99,7 @@ QDeclarativeGeoAddress::QDeclarativeGeoAddress(const QGeoAddress &address, QObje
}
/*!
- \qmlproperty QGeoAddress QtPositioning5::Address::address
+ \qmlproperty QGeoAddress QtPositioning::Address::address
For details on how to use this property to interface between C++ and QML see
"\l {positioning-cpp-qml.html#geoaddress} {Interfaces between C++ and QML Code}".
@@ -125,7 +125,7 @@ void QDeclarativeGeoAddress::setAddress(const QGeoAddress &address)
}
/*!
- \qmlproperty string QtPositioning5::Address::text
+ \qmlproperty string QtPositioning::Address::text
This property holds the address as a single formatted string. It is the recommended
string to use to display the address to the user. It typically takes the format of
diff --git a/src/positioning/qdeclarativegeolocation.cpp b/src/positioning/qdeclarativegeolocation.cpp
index 95ba3113..fd1c0a39 100644
--- a/src/positioning/qdeclarativegeolocation.cpp
+++ b/src/positioning/qdeclarativegeolocation.cpp
@@ -46,8 +46,8 @@ QT_USE_NAMESPACE
/*!
\qmltype Location
\instantiates QDeclarativeGeoLocation
- \inqmlmodule QtPositioning 5.0
- \since Qt Positioning 5.0
+ \inqmlmodule QtPositioning
+ \since 5.2
\brief The Location type holds location data.
diff --git a/src/positioning/qgeoaddress.cpp b/src/positioning/qgeoaddress.cpp
index b62e3431..180d29dd 100644
--- a/src/positioning/qgeoaddress.cpp
+++ b/src/positioning/qgeoaddress.cpp
@@ -317,7 +317,7 @@ QGeoAddressPrivate::~QGeoAddressPrivate()
\ingroup QtPositioning-positioning
\ingroup QtLocation-places-data
\ingroup QtLocation-places
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoAddress class represents an address of a \l QGeoLocation.
diff --git a/src/positioning/qgeoareamonitorinfo.cpp b/src/positioning/qgeoareamonitorinfo.cpp
index b4e0d179..fe1fb812 100644
--- a/src/positioning/qgeoareamonitorinfo.cpp
+++ b/src/positioning/qgeoareamonitorinfo.cpp
@@ -43,6 +43,7 @@
#include <QDateTime>
#include <QSharedData>
#include <QUuid>
+#include <QDataStream>
#ifndef QT_NO_DEBUG_STREAM
#include <QDebug>
diff --git a/src/positioning/qgeoareamonitorsource.cpp b/src/positioning/qgeoareamonitorsource.cpp
index 2f23d942..334d4a05 100644
--- a/src/positioning/qgeoareamonitorsource.cpp
+++ b/src/positioning/qgeoareamonitorsource.cpp
@@ -47,7 +47,7 @@
\class QGeoAreaMonitorSource
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoAreaMonitorSource class enables the detection of proximity
changes for a specified set of coordinates.
diff --git a/src/positioning/qgeocircle.cpp b/src/positioning/qgeocircle.cpp
index 60dffb41..b5499ea7 100644
--- a/src/positioning/qgeocircle.cpp
+++ b/src/positioning/qgeocircle.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
\class QGeoCircle
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoCircle class defines a circular geographic area.
diff --git a/src/positioning/qgeocoordinate.cpp b/src/positioning/qgeocoordinate.cpp
index e3392487..dc1a0e15 100644
--- a/src/positioning/qgeocoordinate.cpp
+++ b/src/positioning/qgeocoordinate.cpp
@@ -91,7 +91,7 @@ QGeoCoordinatePrivate::~QGeoCoordinatePrivate()
\class QGeoCoordinate
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoCoordinate class defines a geographical position on the surface of the Earth.
diff --git a/src/positioning/qgeolocation.cpp b/src/positioning/qgeolocation.cpp
index 2dc5a8b2..6c7ee1f0 100644
--- a/src/positioning/qgeolocation.cpp
+++ b/src/positioning/qgeolocation.cpp
@@ -83,7 +83,7 @@ bool QGeoLocationPrivate::isEmpty() const
\ingroup QtPositioning-positioning
\ingroup QtLocation-places
\ingroup QtLocation-places-data
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoLocation class represents basic information about a location.
diff --git a/src/positioning/qgeopositioninfo.cpp b/src/positioning/qgeopositioninfo.cpp
index dce7ec4e..93fdc274 100644
--- a/src/positioning/qgeopositioninfo.cpp
+++ b/src/positioning/qgeopositioninfo.cpp
@@ -45,6 +45,8 @@
#include <QDataStream>
#include <QtCore/QtNumeric>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
class QGeoPositionInfoPrivate
@@ -59,7 +61,7 @@ public:
\class QGeoPositionInfo
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoPositionInfo class contains information gathered on a global position, direction and velocity at a particular point in time.
@@ -260,7 +262,7 @@ QDebug operator<<(QDebug dbg, const QGeoPositionInfo &info)
dbg.nospace() << info.d->coord;
QList<QGeoPositionInfo::Attribute> attribs = info.d->doubleAttribs.keys();
- qStableSort(attribs.begin(), attribs.end()); // Output a sorted list from an unsorted hash.
+ std::stable_sort(attribs.begin(), attribs.end()); // Output a sorted list from an unsorted hash.
for (int i = 0; i < attribs.count(); ++i) {
dbg.nospace() << ", ";
switch (attribs[i]) {
diff --git a/src/positioning/qgeopositioninfosource.cpp b/src/positioning/qgeopositioninfosource.cpp
index 4fa7a4ca..6556ed02 100644
--- a/src/positioning/qgeopositioninfosource.cpp
+++ b/src/positioning/qgeopositioninfosource.cpp
@@ -50,6 +50,8 @@
#include <QtCore/private/qfactoryloader_p.h>
#include <QtCore/private/qlibrary_p.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_LIBRARY
@@ -62,7 +64,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
\class QGeoPositionInfoSource
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoPositionInfoSource class is an abstract base class for the distribution of positional updates.
@@ -153,7 +155,7 @@ static bool pluginComparator(const QJsonObject &p1, const QJsonObject &p2)
QList<QJsonObject> QGeoPositionInfoSourcePrivate::pluginsSorted()
{
QList<QJsonObject> list = plugins().values();
- qStableSort(list.begin(), list.end(), pluginComparator);
+ std::stable_sort(list.begin(), list.end(), pluginComparator);
return list;
}
diff --git a/src/positioning/qgeopositioninfosource.h b/src/positioning/qgeopositioninfosource.h
index 3e1d54c8..3c641f57 100644
--- a/src/positioning/qgeopositioninfosource.h
+++ b/src/positioning/qgeopositioninfosource.h
@@ -57,9 +57,9 @@ class Q_POSITIONING_EXPORT QGeoPositionInfoSource : public QObject
public:
enum Error {
- AccessError,
- ClosedError, /* 1 */
- UnknownSourceError = -1
+ AccessError = 0,
+ ClosedError,
+ UnknownSourceError
};
Q_ENUMS(Error)
diff --git a/src/positioning/qgeopositioninfosourcefactory.cpp b/src/positioning/qgeopositioninfosourcefactory.cpp
index bebbe20e..0f5acf3f 100644
--- a/src/positioning/qgeopositioninfosourcefactory.cpp
+++ b/src/positioning/qgeopositioninfosourcefactory.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QGeoPositionInfoSourceFactory
\inmodule QtPositioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoPositionInfoSourceFactory class is a factory class used
as the plugin interface for external providers of positioning data.
diff --git a/src/positioning/qgeorectangle.cpp b/src/positioning/qgeorectangle.cpp
index 3c2c0ff8..f85f3939 100644
--- a/src/positioning/qgeorectangle.cpp
+++ b/src/positioning/qgeorectangle.cpp
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
\class QGeoRectangle
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoRectangle class defines a rectangular geographic area.
diff --git a/src/positioning/qgeosatelliteinfo.cpp b/src/positioning/qgeosatelliteinfo.cpp
index 1c19f295..16fe6feb 100644
--- a/src/positioning/qgeosatelliteinfo.cpp
+++ b/src/positioning/qgeosatelliteinfo.cpp
@@ -60,7 +60,7 @@ public:
\class QGeoSatelliteInfo
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoSatelliteInfo class contains basic information about a satellite.
diff --git a/src/positioning/qgeosatelliteinfosource.cpp b/src/positioning/qgeosatelliteinfosource.cpp
index ee1b316a..3cf35634 100644
--- a/src/positioning/qgeosatelliteinfosource.cpp
+++ b/src/positioning/qgeosatelliteinfosource.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
\class QGeoSatelliteInfoSource
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoSatelliteInfoSource class is an abstract base class for the distribution of satellite information updates.
diff --git a/src/positioning/qgeoshape.cpp b/src/positioning/qgeoshape.cpp
index 46f50c3b..e79753f4 100644
--- a/src/positioning/qgeoshape.cpp
+++ b/src/positioning/qgeoshape.cpp
@@ -72,7 +72,7 @@ bool QGeoShapePrivate::operator==(const QGeoShapePrivate &other) const
\class QGeoShape
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QGeoShape class defines a geographic area.
diff --git a/src/positioning/qnmeapositioninfosource.cpp b/src/positioning/qnmeapositioninfosource.cpp
index 14b0f257..9ac928b2 100644
--- a/src/positioning/qnmeapositioninfosource.cpp
+++ b/src/positioning/qnmeapositioninfosource.cpp
@@ -429,7 +429,7 @@ void QNmeaPositionInfoSourcePrivate::emitUpdated(const QGeoPositionInfo &update)
\class QNmeaPositionInfoSource
\inmodule QtPositioning
\ingroup QtPositioning-positioning
- \since Qt Positioning 5.0
+ \since 5.2
\brief The QNmeaPositionInfoSource class provides positional information using a NMEA data source.