summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-09-14 16:07:13 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-09-15 13:31:38 +0000
commit64c608f72f0ffe253d37eefb56b465e70465bb05 (patch)
treedd1295aa1f6a842fcbe4ef907894a6f1164dd0f9
parent4fdb479bbbb946d825b7d908527651c4bf37091c (diff)
downloadqtlocation-64c608f72f0ffe253d37eefb56b465e70465bb05.tar.gz
Use RedirectPolicyAttribute instead of FollowRedirectsAttribute
Because we want to deprecate FollowRedirectsAttribute Change-Id: I3453b120a442dea3624ff2a3f49a2eb565bde762 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/plugins/geoservices/esri/placemanagerengine_esri.cpp2
-rw-r--r--src/plugins/geoservices/osm/qplacemanagerengineosm.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/geoservices/esri/placemanagerengine_esri.cpp b/src/plugins/geoservices/esri/placemanagerengine_esri.cpp
index 525ec785..3858ddf5 100644
--- a/src/plugins/geoservices/esri/placemanagerengine_esri.cpp
+++ b/src/plugins/geoservices/esri/placemanagerengine_esri.cpp
@@ -144,7 +144,7 @@ QPlaceSearchReply *PlaceManagerEngineEsri::search(const QPlaceSearchRequest &req
requestUrl.setQuery(queryItems);
QNetworkRequest networkRequest(requestUrl);
- networkRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
+ networkRequest.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
QNetworkReply *networkReply = m_networkManager->get(networkRequest);
PlaceSearchReplyEsri *reply = new PlaceSearchReplyEsri(request, networkReply, m_candidateFieldsLocale, m_countriesLocale, this);
diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
index d6344989..2c71388f 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
@@ -182,7 +182,7 @@ QPlaceSearchReply *QPlaceManagerEngineOsm::search(const QPlaceSearchRequest &req
requestUrl.setQuery(queryItems);
QNetworkRequest rq(requestUrl);
- rq.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
+ rq.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
QNetworkReply *networkReply = m_networkManager->get(rq);
QPlaceSearchReplyOsm *reply = new QPlaceSearchReplyOsm(request, networkReply, this);