aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/jobs/basejob.cpp8
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());