diff options
author | Timur Pocheptsov <[email protected]> | 2019-08-22 09:43:26 +0200 |
---|---|---|
committer | Timur Pocheptsov <[email protected]> | 2019-08-22 11:21:34 +0200 |
commit | 4300dccba56ed1904c3481a4b19fdc5475f6b3e1 (patch) | |
tree | f23ab50fbbc070af1dbc0817fa66b869bbaec60f /src/network/access/qnetworkrequest.cpp | |
parent | 9db230efa92fec992132fcf7e4bb7fda9707b152 (diff) |
Fix a broken build
QHttp2Configuration is using entities (read definitions) from http2,
which is only conditionally included in the *.pri file (requires http).
So as a result we had linker errors.
Fixes: QTBUG-77759
Change-Id: I8b33b0a4802a295f67edad03da3743b24f7ce514
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index e3976db6422..118fb6b1fbd 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) { |