Use legacy RedirectPolicyAttribute instead of FollowRedirectsAttribute.
RedirectPolicyAttribute was introduced in Qt 5.9, but Debian Stretch is at 5.7. This change can be reverted when the base support version moves to 5.9.
This commit is contained in:
parent
a85b3531c3
commit
52337bf7a4
@ -97,9 +97,9 @@ void SpotifyBlobDownloader::Start() {
|
|||||||
|
|
||||||
QNetworkRequest req(url);
|
QNetworkRequest req(url);
|
||||||
// This policy will work as long as there isn't a redirect from https to
|
// This policy will work as long as there isn't a redirect from https to
|
||||||
// http.
|
// http. This is a legacy attribute that should be changed to use
|
||||||
req.setAttribute(QNetworkRequest::RedirectPolicyAttribute,
|
// RedirectPolicyAttribute when Qt 5.9 is the lowest supported version.
|
||||||
QNetworkRequest::NoLessSafeRedirectPolicy);
|
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||||
|
|
||||||
QNetworkReply* reply = network_->get(req);
|
QNetworkReply* reply = network_->get(req);
|
||||||
connect(reply, SIGNAL(finished()), SLOT(ReplyFinished()));
|
connect(reply, SIGNAL(finished()), SLOT(ReplyFinished()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user