From b10e4e846e7b1a7b4c9c7cb7b4ef1081e22f2354 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Fri, 25 Jun 2021 11:28:27 +0200 Subject: Migrate to autogenerated cpp exports Replace the hardcoded cpp exports with a generated one where it's applicable. Task-number: QTBUG-90492 Change-Id: Idc160b594987b2c765e75bd669aae851b4366282 Reviewed-by: Alexandru Croitor --- src/concurrent/CMakeLists.txt | 1 + src/concurrent/qtconcurrent_global.h | 15 +-------------- src/dbus/CMakeLists.txt | 1 + src/dbus/qtdbusglobal.h | 16 +--------------- src/network/CMakeLists.txt | 1 + src/network/kernel/qtnetworkglobal.h | 15 +-------------- src/opengl/CMakeLists.txt | 1 + src/opengl/qtopenglglobal.h | 15 +-------------- src/openglwidgets/CMakeLists.txt | 1 + src/openglwidgets/qtopenglwidgetsglobal.h | 15 +-------------- src/printsupport/CMakeLists.txt | 1 + src/printsupport/kernel/qtprintsupportglobal.h | 15 +-------------- src/sql/CMakeLists.txt | 1 + src/sql/kernel/qtsqlglobal.h | 11 +---------- src/testlib/CMakeLists.txt | 1 + src/testlib/qttestglobal.h | 11 +---------- src/widgets/CMakeLists.txt | 1 + src/widgets/kernel/qt_widgets_pch.h | 1 + src/widgets/kernel/qtwidgetsglobal.h | 15 +-------------- src/xml/CMakeLists.txt | 1 + src/xml/qtxmlglobal.h | 14 +------------- 21 files changed, 21 insertions(+), 132 deletions(-) diff --git a/src/concurrent/CMakeLists.txt b/src/concurrent/CMakeLists.txt index 876ddaf1ba..bc353f4e89 100644 --- a/src/concurrent/CMakeLists.txt +++ b/src/concurrent/CMakeLists.txt @@ -34,6 +34,7 @@ qt_internal_add_module(Concurrent Qt::CorePrivate PRECOMPILED_HEADER "../corelib/global/qt_pch.h" + GENERATE_CPP_EXPORTS ) ## Scopes: diff --git a/src/concurrent/qtconcurrent_global.h b/src/concurrent/qtconcurrent_global.h index 83c6028e20..8be7d5a12a 100644 --- a/src/concurrent/qtconcurrent_global.h +++ b/src/concurrent/qtconcurrent_global.h @@ -41,19 +41,6 @@ #define QTCONCURRENT_GLOBAL_H #include - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_CONCURRENT_LIB) -# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT -# else -# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_CONCURRENT_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif // include guard diff --git a/src/dbus/CMakeLists.txt b/src/dbus/CMakeLists.txt index d7a82f9fe3..5e4ee48ee7 100644 --- a/src/dbus/CMakeLists.txt +++ b/src/dbus/CMakeLists.txt @@ -48,6 +48,7 @@ qt_internal_add_module(DBus Qt::Core PRIVATE_MODULE_INTERFACE Qt::CorePrivate + GENERATE_CPP_EXPORTS ) set_source_files_properties(qdbusmarshaller.cpp diff --git a/src/dbus/qtdbusglobal.h b/src/dbus/qtdbusglobal.h index 177b9cda6b..69c1afb085 100644 --- a/src/dbus/qtdbusglobal.h +++ b/src/dbus/qtdbusglobal.h @@ -53,22 +53,8 @@ #include #endif -QT_BEGIN_NAMESPACE - #ifndef QT_NO_DBUS - -#ifndef QT_STATIC -# if defined(QT_BUILD_DBUS_LIB) -# define Q_DBUS_EXPORT Q_DECL_EXPORT -# else -# define Q_DBUS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_DBUS_EXPORT -#endif - +#include #endif // QT_NO_DBUS -QT_END_NAMESPACE - #endif diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 4260a4ec68..f74925780c 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -59,6 +59,7 @@ qt_internal_add_module(Network Qt::CorePrivate PRECOMPILED_HEADER "../corelib/global/qt_pch.h" + GENERATE_CPP_EXPORTS ) #### Keys ignored in scope 1:.:.:network.pro:: diff --git a/src/network/kernel/qtnetworkglobal.h b/src/network/kernel/qtnetworkglobal.h index 586b847816..862fc6face 100644 --- a/src/network/kernel/qtnetworkglobal.h +++ b/src/network/kernel/qtnetworkglobal.h @@ -42,20 +42,7 @@ #include #include - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_NETWORK_LIB) -# define Q_NETWORK_EXPORT Q_DECL_EXPORT -# else -# define Q_NETWORK_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_NETWORK_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt index a6e2e56561..1d92e89998 100644 --- a/src/opengl/CMakeLists.txt +++ b/src/opengl/CMakeLists.txt @@ -44,6 +44,7 @@ qt_internal_add_module(OpenGL PRIVATE_MODULE_INTERFACE Qt::CorePrivate Qt::GuiPrivate + GENERATE_CPP_EXPORTS ) ## Scopes: diff --git a/src/opengl/qtopenglglobal.h b/src/opengl/qtopenglglobal.h index 861fb16d59..58a76dbffd 100644 --- a/src/opengl/qtopenglglobal.h +++ b/src/opengl/qtopenglglobal.h @@ -42,19 +42,6 @@ #include #include - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_OPENGL_LIB) -# define Q_OPENGL_EXPORT Q_DECL_EXPORT -# else -# define Q_OPENGL_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_OPENGL_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif // QTOPENGLGLOBAL_H diff --git a/src/openglwidgets/CMakeLists.txt b/src/openglwidgets/CMakeLists.txt index 2a34171cca..ec88e32262 100644 --- a/src/openglwidgets/CMakeLists.txt +++ b/src/openglwidgets/CMakeLists.txt @@ -16,4 +16,5 @@ qt_internal_add_module(OpenGLWidgets PUBLIC_LIBRARIES Qt::OpenGL Qt::Widgets + GENERATE_CPP_EXPORTS ) diff --git a/src/openglwidgets/qtopenglwidgetsglobal.h b/src/openglwidgets/qtopenglwidgetsglobal.h index 41c73fafda..b4886e30b7 100644 --- a/src/openglwidgets/qtopenglwidgetsglobal.h +++ b/src/openglwidgets/qtopenglwidgetsglobal.h @@ -41,19 +41,6 @@ #define QTOPENGLWIDGETSGLOBAL_H #include - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_OPENGLWIDGETS_LIB) -# define Q_OPENGLWIDGETS_EXPORT Q_DECL_EXPORT -# else -# define Q_OPENGLWIDGETS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_OPENGLWIDGETS_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif // QTOPENGLWIDGETSGLOBAL_H diff --git a/src/printsupport/CMakeLists.txt b/src/printsupport/CMakeLists.txt index 02f9ed52e0..43dd89ed85 100644 --- a/src/printsupport/CMakeLists.txt +++ b/src/printsupport/CMakeLists.txt @@ -36,6 +36,7 @@ qt_internal_add_module(PrintSupport Qt::CorePrivate Qt::GuiPrivate Qt::WidgetsPrivate + GENERATE_CPP_EXPORTS ) #### Keys ignored in scope 1:.:.:printsupport.pro:: diff --git a/src/printsupport/kernel/qtprintsupportglobal.h b/src/printsupport/kernel/qtprintsupportglobal.h index 67779af5a2..5d958432ea 100644 --- a/src/printsupport/kernel/qtprintsupportglobal.h +++ b/src/printsupport/kernel/qtprintsupportglobal.h @@ -42,19 +42,6 @@ #include #include - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_PRINTSUPPORT_LIB) -# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT -# else -# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_PRINTSUPPORT_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif // QTPRINTSUPPORTGLOBAL_H diff --git a/src/sql/CMakeLists.txt b/src/sql/CMakeLists.txt index 3398b09a75..b979038f35 100644 --- a/src/sql/CMakeLists.txt +++ b/src/sql/CMakeLists.txt @@ -31,6 +31,7 @@ qt_internal_add_module(Sql Qt::CorePrivate PRECOMPILED_HEADER "../corelib/global/qt_pch.h" + GENERATE_CPP_EXPORTS ) #### Keys ignored in scope 1:.:.:sql.pro:: diff --git a/src/sql/kernel/qtsqlglobal.h b/src/sql/kernel/qtsqlglobal.h index ec79e8da1e..98535d2ad4 100644 --- a/src/sql/kernel/qtsqlglobal.h +++ b/src/sql/kernel/qtsqlglobal.h @@ -42,19 +42,10 @@ #include #include +#include QT_BEGIN_NAMESPACE -#ifndef QT_STATIC -# if defined(QT_BUILD_SQL_LIB) -# define Q_SQL_EXPORT Q_DECL_EXPORT -# else -# define Q_SQL_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_SQL_EXPORT -#endif - namespace QSql { enum Location diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt index 32e44c2d07..18fd9d2cee 100644 --- a/src/testlib/CMakeLists.txt +++ b/src/testlib/CMakeLists.txt @@ -68,6 +68,7 @@ qt_internal_add_module(Test Qt::Core PRIVATE_MODULE_INTERFACE Qt::CorePrivate + GENERATE_CPP_EXPORTS ) #### Keys ignored in scope 1:.:.:testlib.pro:: diff --git a/src/testlib/qttestglobal.h b/src/testlib/qttestglobal.h index 9561e56ba3..70a14d2dd2 100644 --- a/src/testlib/qttestglobal.h +++ b/src/testlib/qttestglobal.h @@ -42,19 +42,10 @@ #include #include +#include QT_BEGIN_NAMESPACE -#if defined(QT_STATIC) -# define Q_TESTLIB_EXPORT -#else -# ifdef QT_BUILD_TESTLIB_LIB -# define Q_TESTLIB_EXPORT Q_DECL_EXPORT -# else -# define Q_TESTLIB_EXPORT Q_DECL_IMPORT -# endif -#endif - #if (defined Q_CC_HPACC) && (defined __ia64) # ifdef Q_TESTLIB_EXPORT # undef Q_TESTLIB_EXPORT diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index e931b43e1b..224453d226 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -63,6 +63,7 @@ qt_internal_add_module(Widgets Qt::GuiPrivate PRECOMPILED_HEADER "kernel/qt_widgets_pch.h" + GENERATE_CPP_EXPORTS ) # Resources: diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h index 3551f19e80..954e50f7a3 100644 --- a/src/widgets/kernel/qt_widgets_pch.h +++ b/src/widgets/kernel/qt_widgets_pch.h @@ -48,6 +48,7 @@ #include "../../gui/kernel/qt_gui_pch.h" #if defined __cplusplus +#include #include #include #include diff --git a/src/widgets/kernel/qtwidgetsglobal.h b/src/widgets/kernel/qtwidgetsglobal.h index 1c74f37618..4b990c6e2a 100644 --- a/src/widgets/kernel/qtwidgetsglobal.h +++ b/src/widgets/kernel/qtwidgetsglobal.h @@ -42,19 +42,6 @@ #include #include - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_WIDGETS_LIB) -# define Q_WIDGETS_EXPORT Q_DECL_EXPORT -# else -# define Q_WIDGETS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_WIDGETS_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif // QTGUIGLOBAL_H diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt index b2db149f8d..11050b5d8c 100644 --- a/src/xml/CMakeLists.txt +++ b/src/xml/CMakeLists.txt @@ -18,6 +18,7 @@ qt_internal_add_module(Xml Qt::Core PRIVATE_MODULE_INTERFACE Qt::CorePrivate + GENERATE_CPP_EXPORTS ) ## Scopes: diff --git a/src/xml/qtxmlglobal.h b/src/xml/qtxmlglobal.h index 1ce3008f4a..9ad9dd4af1 100644 --- a/src/xml/qtxmlglobal.h +++ b/src/xml/qtxmlglobal.h @@ -45,18 +45,6 @@ # include #endif -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_XML_LIB) -# define Q_XML_EXPORT Q_DECL_EXPORT -# else -# define Q_XML_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_XML_EXPORT -#endif - -QT_END_NAMESPACE +#include #endif // QTXMLGLOBAL_H -- cgit v1.2.3