summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-05-14 13:47:42 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-05-18 15:02:15 +0000
commit1160644877a334c4cff608ae1386d2fa8ade6eee (patch)
tree80999b4088abac271d8cc6f8e7a6fa519341e2f1
parent4f8604bf7a94e64f40f5bb769d2105ca4e2f8e9b (diff)
downloadqtlocation-1160644877a334c4cff608ae1386d2fa8ade6eee.tar.gz
Change nominatim base URL to HTTPS
Nominatim switched to HTTPS only recently. This updates the endpoint url. Task-number: QTBUG-68261 Change-Id: I8a5328db61fe4f510ecdc70bf442fc069ae0a998 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit d4702774718a64e6190a786bab03fcbedddbc14d)
-rw-r--r--src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp2
-rw-r--r--src/plugins/geoservices/osm/qplacemanagerengineosm.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
index 693a80a1..5fb5c75a 100644
--- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
@@ -83,7 +83,7 @@ QGeoCodingManagerEngineOsm::QGeoCodingManagerEngineOsm(const QVariantMap &parame
if (parameters.contains(QStringLiteral("osm.geocoding.host")))
m_urlPrefix = parameters.value(QStringLiteral("osm.geocoding.host")).toString().toLatin1();
else
- m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org");
+ m_urlPrefix = QStringLiteral("https://nominatim.openstreetmap.org");
*error = QGeoServiceProvider::NoError;
errorString->clear();
diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
index dcf02b13..b304c77d 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
@@ -189,7 +189,9 @@ QPlaceSearchReply *QPlaceManagerEngineOsm::search(const QPlaceSearchRequest &req
QUrl requestUrl(m_urlPrefix);
requestUrl.setQuery(queryItems);
- QNetworkReply *networkReply = m_networkManager->get(QNetworkRequest(requestUrl));
+ QNetworkRequest rq(requestUrl);
+ rq.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
+ QNetworkReply *networkReply = m_networkManager->get(rq);
QPlaceSearchReplyOsm *reply = new QPlaceSearchReplyOsm(request, networkReply, this);
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));