Use FollowRedirectsAttribute everywhere

This commit is contained in:
Jonas Kvinge
2019-08-22 19:28:54 +02:00
parent 387d790228
commit bd5ab80276
28 changed files with 102 additions and 212 deletions

View File

@@ -53,7 +53,11 @@ bool LoloLyricsProvider::StartSearch(const QString &artist, const QString &album
QUrl url(kUrlSearch);
url.setQuery(url_query);
QNetworkReply *reply = network_->get(QNetworkRequest(url));
QNetworkRequest req(url);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
#endif
QNetworkReply *reply = network_->get(req);
NewClosure(reply, SIGNAL(finished()), this, SLOT(HandleSearchReply(QNetworkReply*, const quint64, const QString&, const QString&)), reply, id, artist, title);
//qLog(Debug) << "LoloLyrics: Sending request for" << url;