summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-07-14 12:03:14 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-07-16 07:57:19 +0000
commit5b66377db126b4a8a3d4bcf28b812d54b45b461a (patch)
tree530776b0ac2ba13958891a5a3bde9038ad19b535 /src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
parent3807b83c62b595727a3e5caea907616fe5899909 (diff)
downloadqtlocation-5b66377db126b4a8a3d4bcf28b812d54b45b461a.tar.gz
Add missing url parameter for OSM places search.
Fixes a few minor grammar/spelling issues in related documentation too. Change-Id: I21c153596b02931c66a38f7068173c687cbe0ad9 Task-number: QTBUG-47188 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins/geoservices/osm/qplacemanagerengineosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qplacemanagerengineosm.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
index 2ae5bd7e..ed2c9ff0 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
@@ -97,6 +97,11 @@ QPlaceManagerEngineOsm::QPlaceManagerEngineOsm(const QVariantMap &parameters,
else
m_userAgent = "Qt Location based application";
+ if (parameters.contains(QStringLiteral("osm.places.host")))
+ m_urlPrefix = parameters.value(QStringLiteral("osm.places.host")).toString();
+ else
+ m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org/search");
+
*error = QGeoServiceProvider::NoError;
errorString->clear();
}
@@ -175,7 +180,7 @@ QPlaceSearchReply *QPlaceManagerEngineOsm::search(const QPlaceSearchRequest &req
queryItems.addQueryItem(QStringLiteral("addressdetails"), QStringLiteral("1"));
- QUrl requestUrl(QStringLiteral("http://nominatim.openstreetmap.org/search?"));
+ QUrl requestUrl(m_urlPrefix);
requestUrl.setQuery(queryItems);
QNetworkReply *networkReply = m_networkManager->get(QNetworkRequest(requestUrl));