Commit 85552ad9 authored by Paolo Angelelli's avatar Paolo Angelelli
Browse files

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: default avatarAlex Blasche <alexander.blasche@qt.io>
(cherry picked from commit d4702774)
parent c9bc6a4f
No related merge requests found
Showing with 4 additions and 2 deletions
......@@ -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();
......
......@@ -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()));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment