From 4756d5bb6c8f4686fcb2d2170e712205ea20ba7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Fri, 23 Dec 2022 16:58:53 +0100 Subject: [PATCH] Network: Remove unneeded Q_QDOC check for http feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http is enabled by default if you have threading support, which is true for qdoc. There is therefore no reason to believe that a normal qdoc configuration won't have it configured, and hence no need to check also explicitly for Q_QDOC. Change-Id: I118388fedaa87225ce81a211d361d593da61105d Reviewed-by: Topi Reiniƶ (cherry picked from commit 9c43bb61349bb73563461819fa02255875c24201) Reviewed-by: Qt Cherry-pick Bot --- src/network/access/qhttp1configuration.h | 2 -- src/network/access/qhttp2configuration.h | 2 -- src/network/access/qnetworkrequest.cpp | 10 +++++----- src/network/access/qnetworkrequest.h | 8 ++++---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/network/access/qhttp1configuration.h b/src/network/access/qhttp1configuration.h index 4b66745f54a..128b8aa5aac 100644 --- a/src/network/access/qhttp1configuration.h +++ b/src/network/access/qhttp1configuration.h @@ -9,9 +9,7 @@ #include #include -#ifndef Q_CLANG_QDOC QT_REQUIRE_CONFIG(http); -#endif QT_BEGIN_NAMESPACE diff --git a/src/network/access/qhttp2configuration.h b/src/network/access/qhttp2configuration.h index 4b3b7d54a25..ae08b664d45 100644 --- a/src/network/access/qhttp2configuration.h +++ b/src/network/access/qhttp2configuration.h @@ -8,9 +8,7 @@ #include -#ifndef Q_QDOC QT_REQUIRE_CONFIG(http); -#endif QT_BEGIN_NAMESPACE diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index bf46e8a4b5e..c99c5f05b86 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -6,7 +6,7 @@ #include "qplatformdefs.h" #include "qnetworkcookie.h" #include "qsslconfiguration.h" -#if QT_CONFIG(http) || defined(Q_QDOC) +#if QT_CONFIG(http) #include "qhttp1configuration.h" #include "qhttp2configuration.h" #include "private/http2protocol_p.h" @@ -859,7 +859,7 @@ void QNetworkRequest::setPeerVerifyName(const QString &peerName) d->peerVerifyName = peerName; } -#if QT_CONFIG(http) || defined(Q_QDOC) +#if QT_CONFIG(http) /*! \since 6.5 @@ -969,9 +969,9 @@ void QNetworkRequest::setDecompressedSafetyCheckThreshold(qint64 threshold) { d->decompressedSafetyCheckThreshold = threshold; } -#endif // QT_CONFIG(http) || defined(Q_QDOC) +#endif // QT_CONFIG(http) -#if QT_CONFIG(http) || defined(Q_QDOC) || defined (Q_OS_WASM) +#if QT_CONFIG(http) || defined (Q_OS_WASM) /*! \since 5.15 @@ -1005,7 +1005,7 @@ void QNetworkRequest::setTransferTimeout(int timeout) { d->transferTimeout = timeout; } -#endif // QT_CONFIG(http) || defined(Q_QDOC) || defined (Q_OS_WASM) +#endif // QT_CONFIG(http) || defined (Q_OS_WASM) static QByteArray headerName(QNetworkRequest::KnownHeaders header) { diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index 3476aa02736..2e7456b9a52 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -144,7 +144,7 @@ public: QString peerVerifyName() const; void setPeerVerifyName(const QString &peerName); -#if QT_CONFIG(http) || defined(Q_QDOC) +#if QT_CONFIG(http) QHttp1Configuration http1Configuration() const; void setHttp1Configuration(const QHttp1Configuration &configuration); @@ -153,12 +153,12 @@ public: qint64 decompressedSafetyCheckThreshold() const; void setDecompressedSafetyCheckThreshold(qint64 threshold); -#endif // QT_CONFIG(http) || defined(Q_QDOC) +#endif // QT_CONFIG(http) -#if QT_CONFIG(http) || defined(Q_QDOC) || defined (Q_OS_WASM) +#if QT_CONFIG(http) || defined (Q_OS_WASM) int transferTimeout() const; void setTransferTimeout(int timeout = DefaultTransferTimeoutConstant); -#endif // QT_CONFIG(http) || defined(Q_QDOC) || defined (Q_OS_WASM) +#endif // QT_CONFIG(http) || defined (Q_OS_WASM) private: QSharedDataPointer d; friend class QNetworkRequestPrivate;