summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-07-30 17:51:07 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-08-27 11:01:47 +0200
commite1fe816d4662875032946844fadfed3ea691fdd8 (patch)
treeacbf411b2ca012bbe7b1be8d9659ff210e5ad455 /src
parent928ffbd1e20860fdcfbddde8e39303252a9ebb98 (diff)
Implement generating of private cpp exports
Add the generating of private cpp exports for Qt modules. Add the GENERATE_PRIVATE_CPP_EXPORTS option to qt_internal_add_module that is the manual switch for private exports generator. Existing modules in qtbase doesn't follow any strict convention of using private cpp export. So there is no clue how to detect if generating of the private exports is required or not for the module. Use autogenerated private cpp exports in QtNetwork module. CPP_EXPORT_HEADER_NAME argument of the qt_internal_add_module function is replaced by the CPP_EXPORT_HEADER_BASE_NAME and has a different meaning. The provided name is used as a base name for the private and non-private headers that contains cpp exports. Header files suffixes are constant: .h and _p.h for the non-private and private header files accordingly. Pick-to: 6.2 Task-number: QTBUG-90492 Change-Id: Icf11304e00379fb8521a865965c19b974e01e62f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/network/CMakeLists.txt1
-rw-r--r--src/network/kernel/qtnetworkglobal_p.h3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
index 1eed014e60..f5887aaa51 100644
--- a/src/network/CMakeLists.txt
+++ b/src/network/CMakeLists.txt
@@ -60,6 +60,7 @@ qt_internal_add_module(Network
PRECOMPILED_HEADER
"../corelib/global/qt_pch.h"
GENERATE_CPP_EXPORTS
+ GENERATE_PRIVATE_CPP_EXPORTS
)
#### Keys ignored in scope 1:.:.:network.pro:<TRUE>:
diff --git a/src/network/kernel/qtnetworkglobal_p.h b/src/network/kernel/qtnetworkglobal_p.h
index 960a192cde..d1452ac704 100644
--- a/src/network/kernel/qtnetworkglobal_p.h
+++ b/src/network/kernel/qtnetworkglobal_p.h
@@ -54,8 +54,7 @@
#include <QtNetwork/qtnetworkglobal.h>
#include <QtCore/private/qglobal_p.h>
#include <QtNetwork/private/qtnetwork-config_p.h>
-
-#define Q_NETWORK_PRIVATE_EXPORT Q_NETWORK_EXPORT
+#include <QtNetwork/private/qtnetworkexports_p.h>
QT_BEGIN_NAMESPACE