summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-06-25 11:28:27 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-06-25 19:33:12 +0200
commitb10e4e846e7b1a7b4c9c7cb7b4ef1081e22f2354 (patch)
tree9f54caca16ad66a0d980334ea45f1ea8d5008993
parent7968281444c967628566337ce3493058825cb946 (diff)
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 <alexandru.croitor@qt.io>
-rw-r--r--src/concurrent/CMakeLists.txt1
-rw-r--r--src/concurrent/qtconcurrent_global.h15
-rw-r--r--src/dbus/CMakeLists.txt1
-rw-r--r--src/dbus/qtdbusglobal.h16
-rw-r--r--src/network/CMakeLists.txt1
-rw-r--r--src/network/kernel/qtnetworkglobal.h15
-rw-r--r--src/opengl/CMakeLists.txt1
-rw-r--r--src/opengl/qtopenglglobal.h15
-rw-r--r--src/openglwidgets/CMakeLists.txt1
-rw-r--r--src/openglwidgets/qtopenglwidgetsglobal.h15
-rw-r--r--src/printsupport/CMakeLists.txt1
-rw-r--r--src/printsupport/kernel/qtprintsupportglobal.h15
-rw-r--r--src/sql/CMakeLists.txt1
-rw-r--r--src/sql/kernel/qtsqlglobal.h11
-rw-r--r--src/testlib/CMakeLists.txt1
-rw-r--r--src/testlib/qttestglobal.h11
-rw-r--r--src/widgets/CMakeLists.txt1
-rw-r--r--src/widgets/kernel/qt_widgets_pch.h1
-rw-r--r--src/widgets/kernel/qtwidgetsglobal.h15
-rw-r--r--src/xml/CMakeLists.txt1
-rw-r--r--src/xml/qtxmlglobal.h14
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 <QtCore/qglobal.h>
-
-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 <QtConcurrent/qtconcurrentexports.h>
#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 <QtCore/qset.h>
#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 <QtDBus/qtdbusexports.h>
#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:<TRUE>:
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 <QtCore/qglobal.h>
#include <QtNetwork/qtnetwork-config.h>
-
-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 <QtNetwork/qtnetworkexports.h>
#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 <QtCore/qglobal.h>
#include <QtGui/qtguiglobal.h>
-
-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 <QtOpenGL/qtopenglexports.h>
#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 <QtCore/qglobal.h>
-
-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 <QtOpenGLWidgets/qtopenglwidgetsexports.h>
#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:<TRUE>:
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 <QtWidgets/qtwidgetsglobal.h>
#include <QtPrintSupport/qtprintsupport-config.h>
-
-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 <QtPrintSupport/qtprintsupportexports.h>
#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:<TRUE>:
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 <QtCore/qglobal.h>
#include <QtSql/qtsql-config.h>
+#include <QtSql/qtsqlexports.h>
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:<TRUE>:
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 <QtCore/qglobal.h>
#include <QtTest/qttestlib-config.h>
+#include <QtTest/qttestexports.h>
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 <qtwidgetsexports.h>
#include <qtwidgetsglobal.h>
#include <qapplication.h>
#include <qabstractbutton.h>
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 <QtGui/qtguiglobal.h>
#include <QtWidgets/qtwidgets-config.h>
-
-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 <QtWidgets/qtwidgetsexports.h>
#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 <QtXml/qtxml-config.h>
#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 <QtXml/qtxmlexports.h>
#endif // QTXMLGLOBAL_H