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 <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
9db230efa9
commit
4300dccba5
@ -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 += \
|
||||
|
@ -44,6 +44,10 @@
|
||||
|
||||
#include <QtCore/qshareddata.h>
|
||||
|
||||
#ifndef Q_CLANG_QDOC
|
||||
QT_REQUIRE_CONFIG(http);
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QHttp2ConfigurationPrivate;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user