summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp2
-rw-r--r--src/imports/location/qdeclarativegeoserviceprovider.cpp6
-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
-rw-r--r--src/plugins/geoservices/nokia/nokia_plugin.json4
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp2
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp2
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp10
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp2
14 files changed, 35 insertions, 31 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp b/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp
index c4fc6d6a..6bd9bc1b 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplaceattribute.cpp
@@ -67,7 +67,7 @@
\li x_provider
\li The name of the provider that a place is sourced from
\row
- \li x_id_<provider> (for example x_id_nokia)
+ \li x_id_<provider> (for example x_id_here)
\li An alternative identifier which identifies the place from the
perspective of the specified provider.
\endtable
diff --git a/src/imports/location/qdeclarativegeoserviceprovider.cpp b/src/imports/location/qdeclarativegeoserviceprovider.cpp
index 02007694..226a723a 100644
--- a/src/imports/location/qdeclarativegeoserviceprovider.cpp
+++ b/src/imports/location/qdeclarativegeoserviceprovider.cpp
@@ -71,12 +71,12 @@ QT_BEGIN_NAMESPACE
The following snippet shows a Plugin object being created with the
\l required and \l preferred properties set. This Plugin will attach to the
first found plugin that supports both mapping and geocoding, and will
- prefer plugins named "nokia" or "osm" to any others.
+ prefer plugins named "here" or "osm" to any others.
\code
Plugin {
id: plugin
- preferred: ["nokia", "osm"]
+ preferred: ["here", "osm"]
required: Plugin.AnyMappingFeatures | Plugin.AnyGeocodingFeatures
}
\endcode
@@ -761,7 +761,7 @@ bool QDeclarativeGeoServiceProviderRequirements::matches(const QGeoServiceProvid
\code
Plugin {
- name: "nokia"
+ name: "here"
PluginParameter { name: "app_id"; value: "EXAMPLE_API_ID" }
PluginParameter { name: "token"; value: "EXAMPLE_TOKEN_123" }
}
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.
diff --git a/src/plugins/geoservices/nokia/nokia_plugin.json b/src/plugins/geoservices/nokia/nokia_plugin.json
index eb6fa68d..1fc2827d 100644
--- a/src/plugins/geoservices/nokia/nokia_plugin.json
+++ b/src/plugins/geoservices/nokia/nokia_plugin.json
@@ -1,6 +1,6 @@
{
- "Keys": ["nokia"],
- "Provider": "nokia",
+ "Keys": ["here"],
+ "Provider": "here",
"Version": 101,
"Experimental": false,
"Features": [
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
index 092f2d86..40bec231 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
@@ -329,7 +329,7 @@ void QPlaceDetailsReplyImpl::replyFinished()
//}
QPlaceAttribute provider;
- provider.setText(QLatin1String("nokia"));
+ provider.setText(QLatin1String("here"));
place.setExtendedAttribute(QPlaceAttribute::Provider, provider);
place.setVisibility(QLocation::PublicVisibility);
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
index 0ba1c65d..90308c24 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
@@ -201,7 +201,7 @@ QPlaceResult QPlaceSearchReplyImpl::parsePlaceResult(const QJsonObject &item) co
place.setPlaceId(href.path().mid(18, 41));
QPlaceAttribute provider;
- provider.setText(QStringLiteral("nokia"));
+ provider.setText(QStringLiteral("here"));
place.setExtendedAttribute(QPlaceAttribute::Provider, provider);
place.setVisibility(QLocation::PublicVisibility);
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
index 15d1bd99..05fb85c5 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
@@ -107,7 +107,7 @@ QGeoTiledMappingManagerEngineNokia::QGeoTiledMappingManagerEngineNokia(
} else {
// managerName() is not yet set, we have to hardcode the plugin name below
cacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)
- + QLatin1String("/QtLocation/nokia");
+ + QLatin1String("/QtLocation/here");
}
QGeoTileCache *tileCache = createTileCacheWithDir(cacheDir);
@@ -266,10 +266,10 @@ void QGeoTiledMappingManagerEngineNokia::updateVersion(const QJsonObject &newVer
void QGeoTiledMappingManagerEngineNokia::saveMapVersion()
{
QDir saveDir(tileCache()->directory());
- QFile saveFile(saveDir.filePath(QStringLiteral("nokia_version")));
+ QFile saveFile(saveDir.filePath(QStringLiteral("here_version")));
if (!saveFile.open(QIODevice::WriteOnly)) {
- qWarning("Failed to write nokia map version.");
+ qWarning("Failed to write here/nokia map version.");
return;
}
@@ -281,10 +281,10 @@ void QGeoTiledMappingManagerEngineNokia::loadMapVersion()
{
QDir saveDir(tileCache()->directory());
- QFile loadFile(saveDir.filePath(QStringLiteral("nokia_version")));
+ QFile loadFile(saveDir.filePath(QStringLiteral("here_version")));
if (!loadFile.open(QIODevice::ReadOnly)) {
- qWarning("Failed to read nokia map version.");
+ qWarning("Failed to read here/nokia map version.");
return;
}
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
index 1c63621a..e2e1612c 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
@@ -212,7 +212,7 @@ QPlaceManagerEngineNokiaV2::QPlaceManagerEngineNokiaV2(
if (!dataLocations.isEmpty() && !dataLocations.first().isEmpty()) {
m_localDataPath = dataLocations.first()
- + QStringLiteral("/nokia/qtlocation/data");
+ + QStringLiteral("/here/qtlocation/data");
}
}