diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-05-28 13:24:16 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-05-31 13:25:04 +0200 |
commit | 51ef6011d6dfc55ea0c8b0cdd1d9e7315087aad9 (patch) | |
tree | c1acbe70ecd6ab8f496a97fb412e4a279c6f7c46 | |
parent | a9edfbd19a624aa4e882df2f5e577ba1831914a3 (diff) | |
download | libquotient-51ef6011d6dfc55ea0c8b0cdd1d9e7315087aad9.tar.gz libquotient-51ef6011d6dfc55ea0c8b0cdd1d9e7315087aad9.zip |
BaseJob: use non-deprecated API for Qt 5.15
Qt 5.15 renamed HTTP2AllowedAttribute to Http2AllowedAttribute,
deprecating the old spelling.
-rw-r--r-- | lib/jobs/basejob.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index e649ea87..26782edc 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -273,7 +273,13 @@ void BaseJob::Private::sendRequest() // Pipelining doesn't fly quite well with SSL, occasionally crashing at // what seems like an attempt to write to a closed channel. // req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); - req.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true); + req.setAttribute( +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + QNetworkRequest::Http2AllowedAttribute +#else + QNetworkRequest::HTTP2AllowedAttribute +#endif + , true); Q_ASSERT(req.url().isValid()); for (auto it = requestHeaders.cbegin(); it != requestHeaders.cend(); ++it) req.setRawHeader(it.key(), it.value()); |