diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-08-18 16:03:27 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-08-22 18:09:36 +0200 |
commit | 409469ba14633545f8cf445baf9ffc286d491094 (patch) | |
tree | ef9e20d68719dd0fa51d6d46b5a9539844d8a047 | |
parent | 93637ea29639a8c661ae546f6d5ca1f93e033aa9 (diff) |
CMake: Fix build when developer-build is on but private_tests is OFF
If qt is first configured without -developer-build, and then
reconfigured with -developer-build, QT_FEATURE_developer_build will be
ON but QT_FEATURE_private_tests remains OFF, and is not reset to ON.
This causes a link failure in Network, because the source files
defining the QNetworkAccessDebugPipeBackendFactory class are only
added if QT_FEATURE_private_tests is ON, which is not the case above,
but the C++ code checks for the QT_INTERNAL_BUILD define which is
defined when -developer-build is ON.
Align the C++ code to check for the private_tests feature.
Pick-to: 6.5 6.6
Task-number: QTBUG-112957
Change-Id: Ib6ed891a84c6b118836497d6ead48019bb1b9052
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index e6fea590bd..b83f2561d3 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -73,7 +73,7 @@ Q_LOGGING_CATEGORY(lcQnam, "qt.network.access.manager") Q_APPLICATION_STATIC(QNetworkAccessFileBackendFactory, fileBackend) -#ifdef QT_BUILD_INTERNAL +#if QT_CONFIG(private_tests) Q_GLOBAL_STATIC(QNetworkAccessDebugPipeBackendFactory, debugpipeBackend) #endif @@ -153,7 +153,7 @@ bool getProxyAuth(const QString& proxyHostname, const QString &scheme, QString& static void ensureInitialized() { -#ifdef QT_BUILD_INTERNAL +#if QT_CONFIG(private_tests) (void) debugpipeBackend(); #endif |