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/qabstractnetworkcache.h \
|
||||||
access/qnetworkfile_p.h \
|
access/qnetworkfile_p.h \
|
||||||
access/qhsts_p.h \
|
access/qhsts_p.h \
|
||||||
access/qhstspolicy.h \
|
access/qhstspolicy.h
|
||||||
access/qhttp2configuration.h
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
access/qnetworkaccessauthenticationmanager.cpp \
|
access/qnetworkaccessauthenticationmanager.cpp \
|
||||||
@ -45,8 +44,7 @@ SOURCES += \
|
|||||||
access/qabstractnetworkcache.cpp \
|
access/qabstractnetworkcache.cpp \
|
||||||
access/qnetworkfile.cpp \
|
access/qnetworkfile.cpp \
|
||||||
access/qhsts.cpp \
|
access/qhsts.cpp \
|
||||||
access/qhstspolicy.cpp \
|
access/qhstspolicy.cpp
|
||||||
access/qhttp2configuration.cpp
|
|
||||||
|
|
||||||
qtConfig(ftp) {
|
qtConfig(ftp) {
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
@ -99,7 +97,8 @@ qtConfig(http) {
|
|||||||
access/qhttpnetworkrequest.cpp \
|
access/qhttpnetworkrequest.cpp \
|
||||||
access/qhttpprotocolhandler.cpp \
|
access/qhttpprotocolhandler.cpp \
|
||||||
access/qhttpthreaddelegate.cpp \
|
access/qhttpthreaddelegate.cpp \
|
||||||
access/qnetworkreplyhttpimpl.cpp
|
access/qnetworkreplyhttpimpl.cpp \
|
||||||
|
access/qhttp2configuration.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
access/qabstractprotocolhandler_p.h \
|
access/qabstractprotocolhandler_p.h \
|
||||||
@ -113,7 +112,8 @@ qtConfig(http) {
|
|||||||
access/qhttpnetworkrequest_p.h \
|
access/qhttpnetworkrequest_p.h \
|
||||||
access/qhttpprotocolhandler_p.h \
|
access/qhttpprotocolhandler_p.h \
|
||||||
access/qhttpthreaddelegate_p.h \
|
access/qhttpthreaddelegate_p.h \
|
||||||
access/qnetworkreplyhttpimpl_p.h
|
access/qnetworkreplyhttpimpl_p.h \
|
||||||
|
access/qhttp2configuration.h
|
||||||
|
|
||||||
qtConfig(ssl) {
|
qtConfig(ssl) {
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
|
@ -44,6 +44,10 @@
|
|||||||
|
|
||||||
#include <QtCore/qshareddata.h>
|
#include <QtCore/qshareddata.h>
|
||||||
|
|
||||||
|
#ifndef Q_CLANG_QDOC
|
||||||
|
QT_REQUIRE_CONFIG(http);
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QHttp2ConfigurationPrivate;
|
class QHttp2ConfigurationPrivate;
|
||||||
|
@ -42,8 +42,10 @@
|
|||||||
#include "qplatformdefs.h"
|
#include "qplatformdefs.h"
|
||||||
#include "qnetworkcookie.h"
|
#include "qnetworkcookie.h"
|
||||||
#include "qsslconfiguration.h"
|
#include "qsslconfiguration.h"
|
||||||
|
#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
|
||||||
#include "qhttp2configuration.h"
|
#include "qhttp2configuration.h"
|
||||||
#include "private/http2protocol_p.h"
|
#include "private/http2protocol_p.h"
|
||||||
|
#endif
|
||||||
#include "QtCore/qshareddata.h"
|
#include "QtCore/qshareddata.h"
|
||||||
#include "QtCore/qlocale.h"
|
#include "QtCore/qlocale.h"
|
||||||
#include "QtCore/qdatetime.h"
|
#include "QtCore/qdatetime.h"
|
||||||
@ -447,7 +449,9 @@ public:
|
|||||||
sslConfiguration = new QSslConfiguration(*other.sslConfiguration);
|
sslConfiguration = new QSslConfiguration(*other.sslConfiguration);
|
||||||
#endif
|
#endif
|
||||||
peerVerifyName = other.peerVerifyName;
|
peerVerifyName = other.peerVerifyName;
|
||||||
|
#if QT_CONFIG(http)
|
||||||
h2Configuration = other.h2Configuration;
|
h2Configuration = other.h2Configuration;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const QNetworkRequestPrivate &other) const
|
inline bool operator==(const QNetworkRequestPrivate &other) const
|
||||||
@ -457,8 +461,11 @@ public:
|
|||||||
rawHeaders == other.rawHeaders &&
|
rawHeaders == other.rawHeaders &&
|
||||||
attributes == other.attributes &&
|
attributes == other.attributes &&
|
||||||
maxRedirectsAllowed == other.maxRedirectsAllowed &&
|
maxRedirectsAllowed == other.maxRedirectsAllowed &&
|
||||||
peerVerifyName == other.peerVerifyName &&
|
peerVerifyName == other.peerVerifyName
|
||||||
h2Configuration == other.h2Configuration;
|
#if QT_CONFIG(http)
|
||||||
|
&& h2Configuration == other.h2Configuration
|
||||||
|
#endif
|
||||||
|
;
|
||||||
// don't compare cookedHeaders
|
// don't compare cookedHeaders
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,7 +476,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
int maxRedirectsAllowed;
|
int maxRedirectsAllowed;
|
||||||
QString peerVerifyName;
|
QString peerVerifyName;
|
||||||
|
#if QT_CONFIG(http)
|
||||||
QHttp2Configuration h2Configuration;
|
QHttp2Configuration h2Configuration;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -481,6 +490,7 @@ public:
|
|||||||
QNetworkRequest::QNetworkRequest()
|
QNetworkRequest::QNetworkRequest()
|
||||||
: d(new QNetworkRequestPrivate)
|
: d(new QNetworkRequestPrivate)
|
||||||
{
|
{
|
||||||
|
#if QT_CONFIG(http)
|
||||||
// Initial values proposed by RFC 7540 are quite draconian,
|
// Initial values proposed by RFC 7540 are quite draconian,
|
||||||
// so unless an application will set its own parameters, we
|
// so unless an application will set its own parameters, we
|
||||||
// make stream window size larger and increase (via WINDOW_UPDATE)
|
// make stream window size larger and increase (via WINDOW_UPDATE)
|
||||||
@ -488,6 +498,7 @@ QNetworkRequest::QNetworkRequest()
|
|||||||
d->h2Configuration.setStreamReceiveWindowSize(Http2::qtDefaultStreamReceiveWindowSize);
|
d->h2Configuration.setStreamReceiveWindowSize(Http2::qtDefaultStreamReceiveWindowSize);
|
||||||
d->h2Configuration.setSessionReceiveWindowSize(Http2::maxSessionReceiveWindowSize);
|
d->h2Configuration.setSessionReceiveWindowSize(Http2::maxSessionReceiveWindowSize);
|
||||||
d->h2Configuration.setServerPushEnabled(false);
|
d->h2Configuration.setServerPushEnabled(false);
|
||||||
|
#endif // QT_CONFIG(http)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -847,6 +858,7 @@ void QNetworkRequest::setPeerVerifyName(const QString &peerName)
|
|||||||
d->peerVerifyName = peerName;
|
d->peerVerifyName = peerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
|
||||||
/*!
|
/*!
|
||||||
\since 5.14
|
\since 5.14
|
||||||
|
|
||||||
@ -890,6 +902,7 @@ void QNetworkRequest::setHttp2Configuration(const QHttp2Configuration &configura
|
|||||||
{
|
{
|
||||||
d->h2Configuration = configuration;
|
d->h2Configuration = configuration;
|
||||||
}
|
}
|
||||||
|
#endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC)
|
||||||
|
|
||||||
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
|
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
|
||||||
{
|
{
|
||||||
|
@ -176,9 +176,10 @@ public:
|
|||||||
|
|
||||||
QString peerVerifyName() const;
|
QString peerVerifyName() const;
|
||||||
void setPeerVerifyName(const QString &peerName);
|
void setPeerVerifyName(const QString &peerName);
|
||||||
|
#if QT_CONFIG(http) || defined(Q_CLANG_QDOC)
|
||||||
QHttp2Configuration http2Configuration() const;
|
QHttp2Configuration http2Configuration() const;
|
||||||
void setHttp2Configuration(const QHttp2Configuration &configuration);
|
void setHttp2Configuration(const QHttp2Configuration &configuration);
|
||||||
|
#endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC)
|
||||||
private:
|
private:
|
||||||
QSharedDataPointer<QNetworkRequestPrivate> d;
|
QSharedDataPointer<QNetworkRequestPrivate> d;
|
||||||
friend class QNetworkRequestPrivate;
|
friend class QNetworkRequestPrivate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user