Fix build on Qt 5.14 and earlier

This commit is contained in:
Cameron Gutman
2020-11-23 20:39:50 -06:00
parent 2ef714f87b
commit d7ca3801be
2 changed files with 16 additions and 1 deletions

View File

@@ -40,7 +40,11 @@ void AutoUpdateChecker::start()
// We'll get a callback when this is finished
QUrl url("https://moonlight-stream.org/updates/qt.json");
QNetworkRequest request(url);
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, true);
#else
request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
#endif
m_Nam.get(request);
#endif
}