From f4523a2a26dc976deaed93493a1285c907ddb3ea Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 7 Jan 2025 12:20:45 +0100 Subject: QtNetworkAuth: simplify QT_NO_HTTP checks The module cannot be built without HTTP support, so each and every file had an `#ifndef QT_NO_HTTP` check. However, commit d49f744968a237b751f0e520f8a9fff59dc283f5 already disabled the module build at the toplevel CMakeLists.txt file if the relevant feature is not found. As a result, we can drop the checks from the private headers and the .cpp files and also remove the QtNetwork/qtnetwork-config.h includes that were added in order to provide access to QT_NO_HTTP definition. This patch still keeps the QT_NO_HTTP check on public headers, because it allows the user code like: #include // unconditionally ... #ifndef QT_NO_HTTP QOAuth1 oauth; // use oauth #endif // QT_NO_HTTP Pick-to: 6.9 6.8 6.5 Change-Id: I517aa1da90ed53a5fc013d28530aa1d41a946a79 Reviewed-by: Juha Vuolle Reviewed-by: Marc Mutz Reviewed-by: Alexandru Croitor --- src/oauth/qoauthhttpserverreplyhandler.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/oauth/qoauthhttpserverreplyhandler.cpp') diff --git a/src/oauth/qoauthhttpserverreplyhandler.cpp b/src/oauth/qoauthhttpserverreplyhandler.cpp index 1bc505e..00191f5 100644 --- a/src/oauth/qoauthhttpserverreplyhandler.cpp +++ b/src/oauth/qoauthhttpserverreplyhandler.cpp @@ -1,10 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include - -#ifndef QT_NO_HTTP - #include #include #include "qabstractoauthreplyhandler_p.h" @@ -667,5 +663,3 @@ bool QOAuthHttpServerReplyHandler::isListening() const QT_END_NAMESPACE #include "moc_qoauthhttpserverreplyhandler.cpp" - -#endif // QT_NO_HTTP -- cgit v1.2.3