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:01:36 +0000
commit85552ad929396a3f05026afd33e88ffc9e9fa145 (patch)
tree8c8d483c7d64265188965b81da83959577d82068
parentc9bc6a4f859c23ec64811828f3228b23988e1f56 (diff)
downloadqtlocation-5.6.tar.gz
Change nominatim base URL to HTTPS5.6
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 757b9577..c599deb8 100644
--- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
@@ -77,7 +77,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 ed2c9ff0..dab12a39 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
@@ -183,7 +183,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()));