diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-05-14 13:47:42 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-05-15 11:01:19 +0000 |
commit | d4702774718a64e6190a786bab03fcbedddbc14d (patch) | |
tree | e273c22226396494e70dcb6f2d6cbd2794678957 | |
parent | be74f55d065f45f4aaa5d5c9c101955801ac3092 (diff) | |
download | qtlocation-d4702774718a64e6190a786bab03fcbedddbc14d.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>
-rw-r--r-- | src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp | 2 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qplacemanagerengineosm.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp index 6065870a..d7751287 100644 --- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp @@ -83,7 +83,7 @@ QGeoCodingManagerEngineOsm::QGeoCodingManagerEngineOsm(const QVariantMap ¶me 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 7e1a2f6c..3c201e41 100644 --- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp @@ -181,7 +181,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())); |