mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
qt5-webkit: rebuild against qt5.14
[ci skip]
This commit is contained in:
parent
9cd262ce68
commit
4199bc5a63
3 changed files with 95 additions and 1 deletions
93
srcpkgs/qt5-webkit/patches/qt5.14.patch
Normal file
93
srcpkgs/qt5-webkit/patches/qt5.14.patch
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
From c344187a099f8fd749dc84ffcc125c0925103819 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Konstantin Tokarev <annulen@yandex.ru>
|
||||||
|
Date: Tue, 10 Sep 2019 03:51:42 +0300
|
||||||
|
Subject: Fix compilation of HTTP2 settings with Qt >= 5.14
|
||||||
|
|
||||||
|
Public API QHttp2Configuration was added, so we use it now instead of
|
||||||
|
ugly hack required for previous versions. Workaround for QTBUG-77308 is
|
||||||
|
no loger needed in 5.14, so we only enable server push.
|
||||||
|
|
||||||
|
Change-Id: I3e6817d8fa274c3a849f09b23ca58f93318be6c4
|
||||||
|
---
|
||||||
|
.../network/qt/QNetworkReplyHandler.cpp | 6 +++---
|
||||||
|
.../platform/network/qt/ResourceRequestQt.cpp | 20 ++++++++++++++++++-
|
||||||
|
2 files changed, 22 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
|
||||||
|
index 0da45fbc79a5..7924595582ac 100644
|
||||||
|
--- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
|
||||||
|
+++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
|
||||||
|
@@ -41,7 +41,7 @@
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
|
-#if USE(HTTP2)
|
||||||
|
+#if USE(HTTP2) && QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
|
||||||
|
#include <private/http2protocol_p.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
@@ -62,7 +62,7 @@ ProtocolParameters::ProtocolParameters()
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
-#endif // USE(HTTP2)
|
||||||
|
+#endif // USE(HTTP2) && QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
|
||||||
|
static const int gMaxRedirections = 10;
|
||||||
|
|
||||||
|
@@ -797,7 +797,7 @@ QNetworkReply* QNetworkReplyHandler::sendNetworkRequest(QNetworkAccessManager* m
|
||||||
|
if (!manager)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
-#if USE(HTTP2)
|
||||||
|
+#if USE(HTTP2) && QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
static const bool alpnIsSupported = ResourceRequest::alpnIsSupported();
|
||||||
|
if (alpnIsSupported && !manager->property(Http2::http2ParametersPropertyName).isValid()) {
|
||||||
|
Http2::ProtocolParameters params;
|
||||||
|
diff --git a/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp b/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
|
||||||
|
index 2cf2e7750dde..310738449b75 100644
|
||||||
|
--- a/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
|
||||||
|
+++ b/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
|
||||||
|
@@ -29,7 +29,10 @@
|
||||||
|
|
||||||
|
#if USE(HTTP2)
|
||||||
|
#include <QSslSocket>
|
||||||
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
+#include <QHttp2Configuration>
|
||||||
|
#endif
|
||||||
|
+#endif // USE(HTTP2)
|
||||||
|
|
||||||
|
namespace WebCore {
|
||||||
|
|
||||||
|
@@ -65,6 +68,16 @@ bool ResourceRequest::alpnIsSupported()
|
||||||
|
return QSslSocket::sslLibraryVersionNumber() > 0x10002000L &&
|
||||||
|
QSslSocket::sslLibraryVersionString().startsWith(QLatin1String("OpenSSL"));
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
+static QHttp2Configuration createHttp2Configuration()
|
||||||
|
+{
|
||||||
|
+ QHttp2Configuration params;
|
||||||
|
+ params.setServerPushEnabled(true);
|
||||||
|
+ return params;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QNetworkRequest ResourceRequest::toNetworkRequest(NetworkingContext *context) const
|
||||||
|
@@ -76,8 +89,13 @@ QNetworkRequest ResourceRequest::toNetworkRequest(NetworkingContext *context) co
|
||||||
|
|
||||||
|
#if USE(HTTP2)
|
||||||
|
static const bool NegotiateHttp2ForHttps = alpnIsSupported();
|
||||||
|
- if (originalUrl.protocolIs("https") && NegotiateHttp2ForHttps)
|
||||||
|
+ if (originalUrl.protocolIs("https") && NegotiateHttp2ForHttps) {
|
||||||
|
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
+ static const auto params = createHttp2Configuration();
|
||||||
|
+ request.setHttp2Configuration(params);
|
||||||
|
+#endif
|
||||||
|
request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
|
||||||
|
+ }
|
||||||
|
#endif // USE(HTTP2)
|
||||||
|
|
||||||
|
const HTTPHeaderMap &headers = httpHeaderFields();
|
1
srcpkgs/qt5-webkit/patches/qt5.14.patch.args
Normal file
1
srcpkgs/qt5-webkit/patches/qt5.14.patch.args
Normal file
|
@ -0,0 +1 @@
|
||||||
|
-Np1
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'qt5-webkit'
|
# Template file for 'qt5-webkit'
|
||||||
pkgname=qt5-webkit
|
pkgname=qt5-webkit
|
||||||
version=5.212.0
|
version=5.212.0
|
||||||
revision=6
|
revision=7
|
||||||
_snap=1565895469
|
_snap=1565895469
|
||||||
_v=${version%.*}
|
_v=${version%.*}
|
||||||
wrksrc="qtwebkit-everywhere-src-${_v}"
|
wrksrc="qtwebkit-everywhere-src-${_v}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue