summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/access/access.pri12
-rw-r--r--src/network/access/qhttp2configuration.h4
-rw-r--r--src/network/access/qnetworkrequest.cpp17
-rw-r--r--src/network/access/qnetworkrequest.h3
4 files changed, 27 insertions, 9 deletions
diff --git a/src/network/access/access.pri b/src/network/access/access.pri
index 87fb82b1a7..cfb20dcd71 100644
--- a/src/network/access/access.pri
+++ b/src/network/access/access.pri
@@ -24,8 +24,7 @@ HEADERS += \
access/qabstractnetworkcache.h \
access/qnetworkfile_p.h \
access/qhsts_p.h \
- access/qhstspolicy.h \
- access/qhttp2configuration.h
+ access/qhstspolicy.h
SOURCES += \
access/qnetworkaccessauthenticationmanager.cpp \
@@ -45,8 +44,7 @@ SOURCES += \
access/qabstractnetworkcache.cpp \
access/qnetworkfile.cpp \
access/qhsts.cpp \
- access/qhstspolicy.cpp \
- access/qhttp2configuration.cpp
+ access/qhstspolicy.cpp
qtConfig(ftp) {
HEADERS += \
@@ -99,7 +97,8 @@ qtConfig(http) {
access/qhttpnetworkrequest.cpp \
access/qhttpprotocolhandler.cpp \
access/qhttpthreaddelegate.cpp \
- access/qnetworkreplyhttpimpl.cpp
+ access/qnetworkreplyhttpimpl.cpp \
+ access/qhttp2configuration.cpp
HEADERS += \
access/qabstractprotocolhandler_p.h \
@@ -113,7 +112,8 @@ qtConfig(http) {
access/qhttpnetworkrequest_p.h \
access/qhttpprotocolhandler_p.h \
access/qhttpthreaddelegate_p.h \
- access/qnetworkreplyhttpimpl_p.h
+ access/qnetworkreplyhttpimpl_p.h \
+ access/qhttp2configuration.h
qtConfig(ssl) {
SOURCES += \
diff --git a/src/network/access/qhttp2configuration.h b/src/network/access/qhttp2configuration.h
index 544e3a3d98..e5c235e2be 100644
--- a/src/network/access/qhttp2configuration.h
+++ b/src/network/access/qhttp2configuration.h
@@ -44,6 +44,10 @@
#include <QtCore/qshareddata.h>
+#ifndef Q_CLANG_QDOC
+QT_REQUIRE_CONFIG(http);
+#endif
+
QT_BEGIN_NAMESPACE
class QHttp2ConfigurationPrivate;
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index e3976db642..118fb6b1fb 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -42,8 +42,10 @@
#include "qplatformdefs.h"
#include "qnetworkcookie.h"
#include "qsslconfiguration.h"
+#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
#include "qhttp2configuration.h"
#include "private/http2protocol_p.h"
+#endif
#include "QtCore/qshareddata.h"
#include "QtCore/qlocale.h"
#include "QtCore/qdatetime.h"
@@ -447,7 +449,9 @@ public:
sslConfiguration = new QSslConfiguration(*other.sslConfiguration);
#endif
peerVerifyName = other.peerVerifyName;
+#if QT_CONFIG(http)
h2Configuration = other.h2Configuration;
+#endif
}
inline bool operator==(const QNetworkRequestPrivate &other) const
@@ -457,8 +461,11 @@ public:
rawHeaders == other.rawHeaders &&
attributes == other.attributes &&
maxRedirectsAllowed == other.maxRedirectsAllowed &&
- peerVerifyName == other.peerVerifyName &&
- h2Configuration == other.h2Configuration;
+ peerVerifyName == other.peerVerifyName
+#if QT_CONFIG(http)
+ && h2Configuration == other.h2Configuration
+#endif
+ ;
// don't compare cookedHeaders
}
@@ -469,7 +476,9 @@ public:
#endif
int maxRedirectsAllowed;
QString peerVerifyName;
+#if QT_CONFIG(http)
QHttp2Configuration h2Configuration;
+#endif
};
/*!
@@ -481,6 +490,7 @@ public:
QNetworkRequest::QNetworkRequest()
: d(new QNetworkRequestPrivate)
{
+#if QT_CONFIG(http)
// Initial values proposed by RFC 7540 are quite draconian,
// so unless an application will set its own parameters, we
// make stream window size larger and increase (via WINDOW_UPDATE)
@@ -488,6 +498,7 @@ QNetworkRequest::QNetworkRequest()
d->h2Configuration.setStreamReceiveWindowSize(Http2::qtDefaultStreamReceiveWindowSize);
d->h2Configuration.setSessionReceiveWindowSize(Http2::maxSessionReceiveWindowSize);
d->h2Configuration.setServerPushEnabled(false);
+#endif // QT_CONFIG(http)
}
/*!
@@ -847,6 +858,7 @@ void QNetworkRequest::setPeerVerifyName(const QString &peerName)
d->peerVerifyName = peerName;
}
+#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
/*!
\since 5.14
@@ -890,6 +902,7 @@ void QNetworkRequest::setHttp2Configuration(const QHttp2Configuration &configura
{
d->h2Configuration = configuration;
}
+#endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC)
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
{
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index 463dabef83..e09ff8aaae 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -176,9 +176,10 @@ public:
QString peerVerifyName() const;
void setPeerVerifyName(const QString &peerName);
-
+#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
QHttp2Configuration http2Configuration() const;
void setHttp2Configuration(const QHttp2Configuration &configuration);
+#endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC)
private:
QSharedDataPointer<QNetworkRequestPrivate> d;
friend class QNetworkRequestPrivate;