Skip to content

Commit

Permalink
Migrate to autogenerated cpp exports
Browse files Browse the repository at this point in the history
Replace the hardcoded cpp exports with a generated one where it's
applicable.

Task-number: QTBUG-90492
Change-Id: Idc160b594987b2c765e75bd669aae851b4366282
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
semlanik committed Jun 25, 2021
1 parent 7968281 commit b10e4e8
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 132 deletions.
1 change: 1 addition & 0 deletions src/concurrent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ qt_internal_add_module(Concurrent
Qt::CorePrivate
PRECOMPILED_HEADER
"../corelib/global/qt_pch.h"
GENERATE_CPP_EXPORTS
)

## Scopes:
Expand Down
15 changes: 1 addition & 14 deletions src/concurrent/qtconcurrent_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/dbus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 1 addition & 15 deletions src/dbus/qtdbusglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/network/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>:
Expand Down
15 changes: 1 addition & 14 deletions src/network/kernel/qtnetworkglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 1 addition & 0 deletions src/opengl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ qt_internal_add_module(OpenGL
PRIVATE_MODULE_INTERFACE
Qt::CorePrivate
Qt::GuiPrivate
GENERATE_CPP_EXPORTS
)

## Scopes:
Expand Down
15 changes: 1 addition & 14 deletions src/opengl/qtopenglglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/openglwidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ qt_internal_add_module(OpenGLWidgets
PUBLIC_LIBRARIES
Qt::OpenGL
Qt::Widgets
GENERATE_CPP_EXPORTS
)
15 changes: 1 addition & 14 deletions src/openglwidgets/qtopenglwidgetsglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/printsupport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>:
Expand Down
15 changes: 1 addition & 14 deletions src/printsupport/kernel/qtprintsupportglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>:
Expand Down
11 changes: 1 addition & 10 deletions src/sql/kernel/qtsqlglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/testlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>:
Expand Down
11 changes: 1 addition & 10 deletions src/testlib/qttestglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/widgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ qt_internal_add_module(Widgets
Qt::GuiPrivate
PRECOMPILED_HEADER
"kernel/qt_widgets_pch.h"
GENERATE_CPP_EXPORTS
)

# Resources:
Expand Down
1 change: 1 addition & 0 deletions src/widgets/kernel/qt_widgets_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
15 changes: 1 addition & 14 deletions src/widgets/kernel/qtwidgetsglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/xml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ qt_internal_add_module(Xml
Qt::Core
PRIVATE_MODULE_INTERFACE
Qt::CorePrivate
GENERATE_CPP_EXPORTS
)

## Scopes:
Expand Down
14 changes: 1 addition & 13 deletions src/xml/qtxmlglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b10e4e8

Please sign in to comment.