1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-15 10:08:08 +01:00

QNetworkRequest::Http2AllowedAttribute require Qt 5.14

This commit is contained in:
Jonas Kvinge 2020-12-20 07:24:44 +01:00
parent 91b9602e12
commit 32ae3cd567
2 changed files with 4 additions and 0 deletions

View File

@ -83,7 +83,9 @@ bool MusixmatchCoverProvider::StartSearch(const QString &artist, const QString &
#else #else
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
req.setAttribute(QNetworkRequest::Http2AllowedAttribute, false); req.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
#endif
QNetworkReply *reply = network_->get(req); QNetworkReply *reply = network_->get(req);
replies_ << reply; replies_ << reply;
connect(reply, &QNetworkReply::finished, [=] { HandleSearchReply(reply, id, artist, album); }); connect(reply, &QNetworkReply::finished, [=] { HandleSearchReply(reply, id, artist, album); });

View File

@ -80,7 +80,9 @@ bool MusixmatchLyricsProvider::StartSearch(const QString &artist, const QString
#else #else
req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); req.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
req.setAttribute(QNetworkRequest::Http2AllowedAttribute, false); req.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
#endif
QNetworkReply *reply = network_->get(req); QNetworkReply *reply = network_->get(req);
replies_ << reply; replies_ << reply;
connect(reply, &QNetworkReply::finished, [=] { HandleSearchReply(reply, id, artist, album, title); }); connect(reply, &QNetworkReply::finished, [=] { HandleSearchReply(reply, id, artist, album, title); });