summaryrefslogtreecommitdiff
path: root/src/location
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-04 16:40:14 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-25 07:51:46 +0000
commit3216d71dae42126c3d730ce56b616abebd1c5b87 (patch)
treefacd0662a0fd25f1b9586fccbc21ac7cdf9547d7 /src/location
parentf738357f041291eb42c8f6a6d5ca9aa1dd4ebfb1 (diff)
downloadqtlocation-3216d71dae42126c3d730ce56b616abebd1c5b87.tar.gz
Changes key of "nokia" geoservices plugin to "here"
The old name is not advertised anymore but the plugin can still be loaded using the "nokia" key. This will be removed by later versions of Qt. Adds a QGeoServiceProvider unit tests Change-Id: I01f36f1bb19d31e0855e90c1605b99e61ee4450b Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'src/location')
-rw-r--r--src/location/doc/snippets/places/requesthandler.h2
-rw-r--r--src/location/doc/src/place-crossref.qdocinc6
-rw-r--r--src/location/doc/src/places.qdoc6
-rw-r--r--src/location/doc/src/plugins/nokia.qdoc12
-rw-r--r--src/location/maps/qgeoserviceprovider.cpp8
-rw-r--r--src/location/places/qplaceattribute.cpp2
-rw-r--r--src/location/places/qplacematchrequest.cpp2
7 files changed, 21 insertions, 17 deletions
diff --git a/src/location/doc/snippets/places/requesthandler.h b/src/location/doc/snippets/places/requesthandler.h
index 2ca13f7b..04b1b055 100644
--- a/src/location/doc/snippets/places/requesthandler.h
+++ b/src/location/doc/snippets/places/requesthandler.h
@@ -293,7 +293,7 @@ public:
QPlaceMatchRequest request;
request.setResults(results);
QVariantMap parameters;
- parameters.insert(QPlaceMatchRequest::AlternativeId, "x_id_nokia");
+ parameters.insert(QPlaceMatchRequest::AlternativeId, "x_id_here");
request.setParameters(parameters);
matchReply = manager->matchingPlaces(request);
//! [Match places]
diff --git a/src/location/doc/src/place-crossref.qdocinc b/src/location/doc/src/place-crossref.qdocinc
index 4d9639f1..f0502f41 100644
--- a/src/location/doc/src/place-crossref.qdocinc
+++ b/src/location/doc/src/place-crossref.qdocinc
@@ -1,7 +1,7 @@
\code
- origin R/O manager(nokia) destination R/W manager (places_jsondb)
+ origin R/O manager(here) destination R/W manager (places_jsondb)
Save
Place id: ae246 ---> Place id: 0001
- Attribute type: x_provider Attribute type: x_id_nokia
- Attribute value: nokia Attribute text value: ae246
+ Attribute type: x_provider Attribute type: x_id_here
+ Attribute value: here Attribute text value: ae246
\endcode
diff --git a/src/location/doc/src/places.qdoc b/src/location/doc/src/places.qdoc
index 9b141c37..4de65220 100644
--- a/src/location/doc/src/places.qdoc
+++ b/src/location/doc/src/places.qdoc
@@ -398,8 +398,8 @@
The matching mechanism can vary between managers, but is typically accomplished through an alternative identifier.
As part of the save process, the place identifier from the origin manager is saved as an alternative identifier attribute in the destination manager
- (which can have its own place identifier scheme). In the following example, the origin manager is from the 'nokia' QGeoServiceProider, therefore
- as part of the saving process an alternative identifier attribute, x_id_nokia, is set for the place saved into the destination manager
+ (which can have its own place identifier scheme). In the following example, the origin manager is from the 'here' QGeoServiceProider, therefore
+ as part of the saving process an alternative identifier attribute, x_id_here, is set for the place saved into the destination manager
(when QPlaceManager::compatiblePlace() is called)
\input place-crossref.qdocinc
@@ -408,7 +408,7 @@
The QPlaceMatchRequest will be used on the destination manager to return corresponding places. We also specify
matching parameters which are key value pairs. As mentioned previously, this can vary depending on the manager but typically
the key is QPlaceMatchRequest::AlternativeId to indicate we are matching by alternative id, the value in this case would be
- x_id_nokia which specifies which alternative identifier attribute we are using to do the matching.
+ x_id_here which specifies which alternative identifier attribute we are using to do the matching.
\snippet places/requesthandler.h Match places
\dots
diff --git a/src/location/doc/src/plugins/nokia.qdoc b/src/location/doc/src/plugins/nokia.qdoc
index 773caf95..32620b89 100644
--- a/src/location/doc/src/plugins/nokia.qdoc
+++ b/src/location/doc/src/plugins/nokia.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
-\page location-plugin-nokia.html
+\page location-plugin-here.html
\title Qt Location HERE Plugin
\ingroup QtLocation-plugins
@@ -35,14 +35,14 @@
\section1 Overview
Included with Qt Location is a geo services plugin which accesses the relevant HERE services
-provided by Nokia. The use of these services is governed by the terms and conditions
+provided by HERE/Nokia. The use of these services is governed by the terms and conditions
available at \l {https://developer.here.com/terms-conditions}.
Note that accepting the terms and conditions only applies those terms and conditions to the use of
the HERE geo services plugin and does not limit the use of the other geo services plugins that may
be included with Qt.
-The HERE geo services plugin can be loaded by using the plugin key "nokia".
+The HERE geo services plugin can be loaded by using the plugin key "here".
The online plugin uses the tiled map classes, which caches tile data in heap memory and texture
memory.
@@ -130,7 +130,7 @@ authentication.
\code
Plugin {
- name: "nokia"
+ name: "here"
PluginParameter { name: "app_id"; value: "myapp" }
PluginParameter { name: "token"; value: "abcdefg12345" }
}
@@ -143,7 +143,7 @@ QMap<QString,QVariant> params;
params["app_id"] = "myapp";
params["token"] = "abcdefg12345";
-QGeoServiceProvider *gsp = new QGeoServiceProvider("nokia", params);
+QGeoServiceProvider *gsp = new QGeoServiceProvider("here", params);
\endcode
\section1 Places
@@ -304,7 +304,7 @@ At the time of writing, it is known that some places provide \c openingHours
(QPlaceAttribute::OpeningHours) and \c payment (QPlaceAttribute::Payment)
methods but other attributes may be made available by the backend server. All
places provided by the plugin will have the \c x_provider
-(QPlaceAttribute::Provider) attribute set to \c nokia.
+(QPlaceAttribute::Provider) attribute set to \c here.
\section3 Restrictions of Usage - ExtendedAttributes and Content
The extended attributes and rich content of places are not permitted
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp
index 001f0184..bb43bf9e 100644
--- a/src/location/maps/qgeoserviceprovider.cpp
+++ b/src/location/maps/qgeoserviceprovider.cpp
@@ -102,7 +102,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
\list
\li "mapbox" -> \l {Qt Location Mapbox Plugin}{Mapbox service}
- \li "nokia" -> \l {Qt Location HERE Plugin}{HERE Services}
+ \li "here" -> \l {Qt Location HERE Plugin}{HERE Services}
\li "osm" -> \l {Qt Location Open Street Map Plugin}{OpenStreetMap Services}
\endlist
*/
@@ -223,7 +223,11 @@ QGeoServiceProvider::QGeoServiceProvider(const QString &providerName,
{
d_ptr->experimental = allowExperimental;
d_ptr->parameterMap = parameters;
- d_ptr->providerName = providerName;
+ // TODO Qt 6 Remove silent nokia rename
+ if (providerName == QStringLiteral("nokia"))
+ d_ptr->providerName = QStringLiteral("here");
+ else
+ d_ptr->providerName = providerName;
d_ptr->loadMeta();
}
diff --git a/src/location/places/qplaceattribute.cpp b/src/location/places/qplaceattribute.cpp
index 7369a19f..924bd89c 100644
--- a/src/location/places/qplaceattribute.cpp
+++ b/src/location/places/qplaceattribute.cpp
@@ -94,7 +94,7 @@ bool QPlaceAttributePrivate::isEmpty() const
\li QPlaceAttribute::Provider
\endlist
- There is a class of attribute types of the format x_id_<provider> for example x_id_nokia.
+ There is a class of attribute types of the format x_id_<provider> for example x_id_here.
This class of attributes is a set of alternative identifiers of the place, from the specified provider's
perspective.
diff --git a/src/location/places/qplacematchrequest.cpp b/src/location/places/qplacematchrequest.cpp
index 2bd07e0e..40ee7ea1 100644
--- a/src/location/places/qplacematchrequest.cpp
+++ b/src/location/places/qplacematchrequest.cpp
@@ -110,7 +110,7 @@ void QPlaceMatchRequestPrivate::clear()
A set of further parameters are specified which determines the criteria for matching.
The typical key for matching is the QPlaceMatchRequest::AlternativeId, the value is an alternative identifier attribute type of the format
- x_id_<provider name> for example x_id_nokia. The provider name is name supplied to the QGeoServiceProvider instance.
+ x_id_<provider name> for example x_id_here. The provider name is name supplied to the QGeoServiceProvider instance.
See \l {Matching places between managers} for an example on how to use a match request.