diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-06-29 15:27:51 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2021-11-02 16:32:25 +0100 |
commit | 250d6269e9f60021d88a574d04941ab342afb632 (patch) | |
tree | b2630f309c5e94384b739e15d8c6a69e2e137101 /src | |
parent | 6b4d3613326b38bc05c813c449b31affd9c3795a (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: I4af021bf828e05c8d6f3f975befd3b6b2cf63462
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
51 files changed, 75 insertions, 313 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c9d9c1444d..d4fdae8f37 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -15,6 +15,8 @@ qt_internal_add_qml_module(QmlCore PUBLIC_LIBRARIES Qt::Core Qt::Qml + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_add_docs(QmlCore diff --git a/src/core/qqmlcoreglobal_p.h b/src/core/qqmlcoreglobal_p.h index f97e7df911..a7e9bce181 100644 --- a/src/core/qqmlcoreglobal_p.h +++ b/src/core/qqmlcoreglobal_p.h @@ -52,21 +52,6 @@ // #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QML_CORE_LIB) -# define Q_QMLCORE_EXPORT Q_DECL_EXPORT -# else -# define Q_QMLCORE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QMLCORE_EXPORT -#endif - -#define Q_QMLCORE_PRIVATE_EXPORT Q_QMLCORE_EXPORT - -QT_END_NAMESPACE +#include <QtQmlCore/private/qtqmlcoreexports_p.h> #endif // QQMLCOREGLOBAL_P_H diff --git a/src/labs/animation/CMakeLists.txt b/src/labs/animation/CMakeLists.txt index 88e756f3a6..c733a6db23 100644 --- a/src/labs/animation/CMakeLists.txt +++ b/src/labs/animation/CMakeLists.txt @@ -11,4 +11,6 @@ qt_internal_add_qml_module(LabsAnimation PUBLIC_LIBRARIES Qt::QmlPrivate Qt::QuickPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/labs/animation/qqmlanimationglobal_p.h b/src/labs/animation/qqmlanimationglobal_p.h index 445ca8b136..81cd2edc83 100644 --- a/src/labs/animation/qqmlanimationglobal_p.h +++ b/src/labs/animation/qqmlanimationglobal_p.h @@ -53,19 +53,6 @@ // We mean it. // -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_LABSANIMATION_LIB) -# define Q_LABSANIMATION_EXPORT Q_DECL_EXPORT -# else -# define Q_LABSANIMATION_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_LABSANIMATION_EXPORT -#endif -#define Q_LABSANIMATION_PRIVATE_EXPORT Q_LABSANIMATION_EXPORT - -QT_END_NAMESPACE +#include <QtLabsAnimation/private/qtlabsanimationexports_p.h> #endif // QTLABSANIMATIONGLOBAL_P_H diff --git a/src/labs/folderlistmodel/CMakeLists.txt b/src/labs/folderlistmodel/CMakeLists.txt index 8f49d691dd..67572aa0d7 100644 --- a/src/labs/folderlistmodel/CMakeLists.txt +++ b/src/labs/folderlistmodel/CMakeLists.txt @@ -13,4 +13,6 @@ qt_internal_add_qml_module(LabsFolderListModel PUBLIC_LIBRARIES Qt::CorePrivate Qt::QmlPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/labs/folderlistmodel/qquickfolderlistmodel_p.h b/src/labs/folderlistmodel/qquickfolderlistmodel_p.h index 6d7fa8c82d..6c0940abf3 100644 --- a/src/labs/folderlistmodel/qquickfolderlistmodel_p.h +++ b/src/labs/folderlistmodel/qquickfolderlistmodel_p.h @@ -67,7 +67,7 @@ class QModelIndex; class QQuickFolderListModelPrivate; //![class begin] -class Q_LABSFOLDERMODEL_PRIVATE_EXPORT QQuickFolderListModel : public QAbstractListModel, public QQmlParserStatus +class Q_LABSFOLDERLISTMODEL_PRIVATE_EXPORT QQuickFolderListModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) diff --git a/src/labs/folderlistmodel/qquickfolderlistmodelglobal_p.h b/src/labs/folderlistmodel/qquickfolderlistmodelglobal_p.h index 578ea49fcd..92df52b4a5 100644 --- a/src/labs/folderlistmodel/qquickfolderlistmodelglobal_p.h +++ b/src/labs/folderlistmodel/qquickfolderlistmodelglobal_p.h @@ -53,19 +53,6 @@ // We mean it. // -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_LABSFOLDERMODEL_LIB) -# define Q_LABSFOLDERMODEL_EXPORT Q_DECL_EXPORT -# else -# define Q_LABSFOLDERMODEL_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_LABSFOLDERMODEL_EXPORT -#endif -#define Q_LABSFOLDERMODEL_PRIVATE_EXPORT Q_LABSFOLDERMODEL_EXPORT - -QT_END_NAMESPACE +#include <QtLabsFolderListModel/private/qtlabsfolderlistmodelexports_p.h> #endif // QTLABSFOLDERLISTMODELGLOBAL_P_H diff --git a/src/labs/models/CMakeLists.txt b/src/labs/models/CMakeLists.txt index e417013ea6..5a992eab9d 100644 --- a/src/labs/models/CMakeLists.txt +++ b/src/labs/models/CMakeLists.txt @@ -10,6 +10,8 @@ qt_internal_add_qml_module(LabsQmlModels PUBLIC_LIBRARIES Qt::QmlModelsPrivate Qt::QmlPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_extend_target(LabsQmlModels CONDITION QT_FEATURE_qml_table_model diff --git a/src/labs/models/qqmlmodelsglobal_p.h b/src/labs/models/qqmlmodelsglobal_p.h index 46638b0442..65d7b80b62 100644 --- a/src/labs/models/qqmlmodelsglobal_p.h +++ b/src/labs/models/qqmlmodelsglobal_p.h @@ -53,19 +53,6 @@ // We mean it. // -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_LABSQMLMODELS_LIB) -# define Q_LABSQMLMODELS_EXPORT Q_DECL_EXPORT -# else -# define Q_LABSQMLMODELS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_LABSQMLMODELS_EXPORT -#endif -#define Q_LABSQMLMODELS_PRIVATE_EXPORT Q_LABSQMLMODELS_EXPORT - -QT_END_NAMESPACE +#include <QtLabsQmlModels/private/qtlabsqmlmodelsexports_p.h> #endif // QTLABSQMLMODELSGLOBAL_P_H diff --git a/src/labs/settings/CMakeLists.txt b/src/labs/settings/CMakeLists.txt index e40e727f98..8c857ff8ad 100644 --- a/src/labs/settings/CMakeLists.txt +++ b/src/labs/settings/CMakeLists.txt @@ -11,4 +11,6 @@ qt_internal_add_qml_module(LabsSettings PUBLIC_LIBRARIES Qt::Core Qt::Qml + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/labs/settings/qqmlsettingsglobal_p.h b/src/labs/settings/qqmlsettingsglobal_p.h index 16a90de5a6..4ae4e7bc0b 100644 --- a/src/labs/settings/qqmlsettingsglobal_p.h +++ b/src/labs/settings/qqmlsettingsglobal_p.h @@ -53,19 +53,6 @@ // We mean it. // -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_LABSSETTINGS_LIB) -# define Q_LABSSETTINGS_EXPORT Q_DECL_EXPORT -# else -# define Q_LABSSETTINGS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_LABSSETTINGS_EXPORT -#endif -#define Q_LABSSETTINGS_PRIVATE_EXPORT Q_LABSSETTINGS_EXPORT - -QT_END_NAMESPACE +#include <QtLabsSettings/private/qtlabssettingsexports_p.h> #endif // QTLABSSETTINGSGLOBAL_P_H diff --git a/src/labs/sharedimage/CMakeLists.txt b/src/labs/sharedimage/CMakeLists.txt index b59c30d905..0dec607ac2 100644 --- a/src/labs/sharedimage/CMakeLists.txt +++ b/src/labs/sharedimage/CMakeLists.txt @@ -15,6 +15,8 @@ qt_internal_add_qml_module(LabsSharedImage Qt::CorePrivate Qt::GuiPrivate Qt::QuickPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) # We need to do additional initialization, so we have to provide our own diff --git a/src/labs/sharedimage/qtlabssharedimageglobal_p.h b/src/labs/sharedimage/qtlabssharedimageglobal_p.h index c67be432dd..a517905d80 100644 --- a/src/labs/sharedimage/qtlabssharedimageglobal_p.h +++ b/src/labs/sharedimage/qtlabssharedimageglobal_p.h @@ -53,20 +53,7 @@ // We mean it. // -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_LABSSHAREDIMAGE_LIB) -# define Q_LABSSHAREDIMAGE_EXPORT Q_DECL_EXPORT -# else -# define Q_LABSSHAREDIMAGE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_LABSSHAREDIMAGE_EXPORT -#endif -#define Q_LABSSHAREDIMAGE_PRIVATE_EXPORT Q_LABSSHAREDIMAGE_EXPORT - -QT_END_NAMESPACE +#include <QtLabsSharedImage/private/qtlabssharedimageexports_p.h> void Q_LABSSHAREDIMAGE_PRIVATE_EXPORT qml_register_types_Qt_labs_sharedimage(); diff --git a/src/labs/wavefrontmesh/CMakeLists.txt b/src/labs/wavefrontmesh/CMakeLists.txt index 7a6c7a5cc0..1eb4ac13b3 100644 --- a/src/labs/wavefrontmesh/CMakeLists.txt +++ b/src/labs/wavefrontmesh/CMakeLists.txt @@ -12,4 +12,6 @@ qt_internal_add_qml_module(LabsWavefrontMesh Qt::CorePrivate Qt::GuiPrivate Qt::QuickPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/labs/wavefrontmesh/qqmlwavefrontmeshglobal_p.h b/src/labs/wavefrontmesh/qqmlwavefrontmeshglobal_p.h index 81296535b4..691ecaacbc 100644 --- a/src/labs/wavefrontmesh/qqmlwavefrontmeshglobal_p.h +++ b/src/labs/wavefrontmesh/qqmlwavefrontmeshglobal_p.h @@ -53,19 +53,6 @@ // We mean it. // -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_LABSWAVEFRONTMESH_LIB) -# define Q_LABSWAVEFRONTMESH_EXPORT Q_DECL_EXPORT -# else -# define Q_LABSWAVEFRONTMESH_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_LABSWAVEFRONTMESH_EXPORT -#endif -#define Q_LABSWAVEFRONTMESH_PRIVATE_EXPORT Q_LABSWAVEFRONTMESH_EXPORT - -QT_END_NAMESPACE +#include <QtLabsWavefrontMesh/private/qtlabswavefrontmeshexports_p.h> #endif // QTLABSWAVEFRONTMESHGLOBAL_P_H diff --git a/src/particles/CMakeLists.txt b/src/particles/CMakeLists.txt index 9e98783638..edda4df914 100644 --- a/src/particles/CMakeLists.txt +++ b/src/particles/CMakeLists.txt @@ -48,6 +48,8 @@ qt_internal_add_qml_module(QuickParticlesPrivate Qt::GuiPrivate Qt::QmlPrivate Qt::QuickPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) # Resources: diff --git a/src/particles/qtquickparticlesglobal_p.h b/src/particles/qtquickparticlesglobal_p.h index d7647b3d97..426414dabb 100644 --- a/src/particles/qtquickparticlesglobal_p.h +++ b/src/particles/qtquickparticlesglobal_p.h @@ -52,17 +52,6 @@ // #include <QtCore/qglobal.h> - -// We only have private exports from this library - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKPARTICLES_LIB) -# define Q_QUICKPARTICLES_PRIVATE_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKPARTICLES_PRIVATE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKPARTICLES_PRIVATE_EXPORT -#endif +#include <QtQuickParticles/private/qtquickparticlesexports_p.h> #endif // QTQUICKPARTICLESGLOBAL_P_H diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 08f7d52ab5..879436ac7a 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -395,6 +395,8 @@ qt_internal_add_qml_module(Qml EXTRA_CMAKE_INCLUDES "${INSTALL_CMAKE_NAMESPACE}QmlFindQmlscInternal.cmake" ${extra_cmake_includes} + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) # Linking to the static qml plugin should also automatically link to the worker script diff --git a/src/qml/qtqmlglobal.h b/src/qml/qtqmlglobal.h index 387eba6231..0651355c67 100644 --- a/src/qml/qtqmlglobal.h +++ b/src/qml/qtqmlglobal.h @@ -47,17 +47,6 @@ # include <QtNetwork/qtnetworkglobal.h> #endif -QT_BEGIN_NAMESPACE +# include <QtQml/qtqmlexports.h> -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QML_LIB) -# define Q_QML_EXPORT Q_DECL_EXPORT -# else -# define Q_QML_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QML_EXPORT -#endif - -QT_END_NAMESPACE #endif // QTQMLGLOBAL_H diff --git a/src/qml/qtqmlglobal_p.h b/src/qml/qtqmlglobal_p.h index 02f4f54119..c59e79257b 100644 --- a/src/qml/qtqmlglobal_p.h +++ b/src/qml/qtqmlglobal_p.h @@ -54,8 +54,8 @@ #include <QtCore/private/qglobal_p.h> #include <QtQml/qtqmlglobal.h> #include <QtQml/private/qtqml-config_p.h> +#include <QtQml/private/qtqmlexports_p.h> -#define Q_QML_PRIVATE_EXPORT Q_QML_EXPORT #define Q_QML_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT #endif // QTQMLGLOBAL_P_H diff --git a/src/qmllocalstorage/CMakeLists.txt b/src/qmllocalstorage/CMakeLists.txt index 7285b84a8e..e73ab90d18 100644 --- a/src/qmllocalstorage/CMakeLists.txt +++ b/src/qmllocalstorage/CMakeLists.txt @@ -12,4 +12,6 @@ qt_internal_add_qml_module(QmlLocalStorage Qt::CorePrivate Qt::QmlPrivate Qt::Sql + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/qmllocalstorage/qqmllocalstorageglobal_p.h b/src/qmllocalstorage/qqmllocalstorageglobal_p.h index fb921518f4..0634e75d1f 100644 --- a/src/qmllocalstorage/qqmllocalstorageglobal_p.h +++ b/src/qmllocalstorage/qqmllocalstorageglobal_p.h @@ -52,22 +52,6 @@ // #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QMLLOCALSTORAGE_LIB) -# define Q_QMLLOCALSTORAGE_EXPORT Q_DECL_EXPORT -# else -# define Q_QMLLOCALSTORAGE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QMLLOCALSTORAGE_EXPORT -#endif - - -#define Q_QMLLOCALSTORAGE_PRIVATE_EXPORT Q_QMLLOCALSTORAGE_EXPORT - -QT_END_NAMESPACE +#include <QtQmlLocalStorage/private/qtqmllocalstorageexports_p.h> #endif // QQMLLOCALSTORAGEGLOBAL_P_H diff --git a/src/qmlmodels/CMakeLists.txt b/src/qmlmodels/CMakeLists.txt index 3166e5d90c..b29dd86d8a 100644 --- a/src/qmlmodels/CMakeLists.txt +++ b/src/qmlmodels/CMakeLists.txt @@ -25,6 +25,8 @@ qt_internal_add_qml_module(QmlModels PRIVATE_MODULE_INTERFACE Qt::CorePrivate Qt::QmlPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_extend_target(QmlModels CONDITION QT_FEATURE_qml_object_model diff --git a/src/qmlmodels/qtqmlmodelsglobal.h b/src/qmlmodels/qtqmlmodelsglobal.h index 6e6cf299b2..66f25bf444 100644 --- a/src/qmlmodels/qtqmlmodelsglobal.h +++ b/src/qmlmodels/qtqmlmodelsglobal.h @@ -42,18 +42,6 @@ #include <QtQml/qtqmlglobal.h> #include <QtQmlModels/qtqmlmodels-config.h> +#include <QtQmlModels/qtqmlmodelsexports.h> -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QMLMODELS_LIB) -# define Q_QMLMODELS_EXPORT Q_DECL_EXPORT -# else -# define Q_QMLMODELS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QMLMODELS_EXPORT -#endif - -QT_END_NAMESPACE #endif // QTQMLMODELSGLOBAL_H diff --git a/src/qmlmodels/qtqmlmodelsglobal_p.h b/src/qmlmodels/qtqmlmodelsglobal_p.h index 145112c9c1..44ca8fb2c8 100644 --- a/src/qmlmodels/qtqmlmodelsglobal_p.h +++ b/src/qmlmodels/qtqmlmodelsglobal_p.h @@ -54,8 +54,8 @@ #include <QtQml/private/qtqmlglobal_p.h> #include <QtQmlModels/qtqmlmodelsglobal.h> #include <QtQmlModels/private/qtqmlmodels-config_p.h> +#include <QtQmlModels/private/qtqmlmodelsexports_p.h> -#define Q_QMLMODELS_PRIVATE_EXPORT Q_QMLMODELS_EXPORT #define Q_QMLMODELS_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT #endif // QTQMLMODELSGLOBAL_P_H diff --git a/src/qmlworkerscript/CMakeLists.txt b/src/qmlworkerscript/CMakeLists.txt index 3525107cfe..bb00e88f12 100644 --- a/src/qmlworkerscript/CMakeLists.txt +++ b/src/qmlworkerscript/CMakeLists.txt @@ -48,6 +48,8 @@ qt_internal_add_qml_module(QmlWorkerScript PRIVATE_MODULE_INTERFACE Qt::CorePrivate Qt::QmlPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_extend_target(QmlWorkerScript CONDITION WIN32 diff --git a/src/qmlworkerscript/qtqmlworkerscriptglobal.h b/src/qmlworkerscript/qtqmlworkerscriptglobal.h index be3ea4e12a..87ee6b32a5 100644 --- a/src/qmlworkerscript/qtqmlworkerscriptglobal.h +++ b/src/qmlworkerscript/qtqmlworkerscriptglobal.h @@ -41,18 +41,6 @@ #define QTQMLWORKERSCRIPTGLOBAL_H #include <QtQml/qtqmlglobal.h> +#include <QtQmlWorkerScript/qtqmlworkerscriptexports.h> -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QMLWORKERSCRIPT_LIB) -# define Q_QMLWORKERSCRIPT_EXPORT Q_DECL_EXPORT -# else -# define Q_QMLWORKERSCRIPT_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QMLWORKERSCRIPT_EXPORT -#endif - -QT_END_NAMESPACE #endif // QTQMLWORKERSCRIPTGLOBAL_H diff --git a/src/qmlworkerscript/qtqmlworkerscriptglobal_p.h b/src/qmlworkerscript/qtqmlworkerscriptglobal_p.h index 34236cd79e..aa754f7c9e 100644 --- a/src/qmlworkerscript/qtqmlworkerscriptglobal_p.h +++ b/src/qmlworkerscript/qtqmlworkerscriptglobal_p.h @@ -53,8 +53,8 @@ #include <QtQml/private/qtqmlglobal_p.h> #include <QtQmlWorkerScript/qtqmlworkerscriptglobal.h> +#include <QtQmlWorkerScript/private/qtqmlworkerscriptexports_p.h> -#define Q_QMLWORKERSCRIPT_PRIVATE_EXPORT Q_QMLWORKERSCRIPT_EXPORT #define Q_QMLWORKERSCRIPT_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT #endif // QTQMLWORKERSCRIPTGLOBAL_P_H diff --git a/src/qmlxmllistmodel/CMakeLists.txt b/src/qmlxmllistmodel/CMakeLists.txt index 3a74462081..1938ed3158 100644 --- a/src/qmlxmllistmodel/CMakeLists.txt +++ b/src/qmlxmllistmodel/CMakeLists.txt @@ -17,6 +17,8 @@ qt_internal_add_qml_module(QmlXmlListModel Qt::Qml PRIVATE_MODULE_INTERFACE Qt::CorePrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_add_docs(QmlXmlListModel diff --git a/src/qmlxmllistmodel/qtqmlxmllistmodelglobal_p.h b/src/qmlxmllistmodel/qtqmlxmllistmodelglobal_p.h index d124891ef3..7b0d833333 100644 --- a/src/qmlxmllistmodel/qtqmlxmllistmodelglobal_p.h +++ b/src/qmlxmllistmodel/qtqmlxmllistmodelglobal_p.h @@ -52,21 +52,6 @@ // #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QMLXMLLISTMODEL_LIB) -# define Q_QMLXMLLISTMODEL_EXPORT Q_DECL_EXPORT -# else -# define Q_QMLXMLLISTMODEL_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QMLXMLLISTMODEL_EXPORT -#endif - -#define Q_QMLXMLLISTMODEL_PRIVATE_EXPORT Q_QMLXMLLISTMODEL_EXPORT - -QT_END_NAMESPACE +#include <QtQmlXmlListModel/private/qtqmlxmllistmodelexports_p.h> #endif // QTQMLXMLLISTMODELGLOBAL_P_H diff --git a/src/quick/CMakeLists.txt b/src/quick/CMakeLists.txt index 372df6cfd8..0501726a86 100644 --- a/src/quick/CMakeLists.txt +++ b/src/quick/CMakeLists.txt @@ -222,6 +222,8 @@ qt_internal_add_qml_module(Quick Qt::GuiPrivate Qt::QmlModelsPrivate Qt::QmlPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) # We need to do additional initialization, so we have to provide our own diff --git a/src/quick/qtquickglobal.h b/src/quick/qtquickglobal.h index 5e83c1db84..d26d7c06f1 100644 --- a/src/quick/qtquickglobal.h +++ b/src/quick/qtquickglobal.h @@ -43,19 +43,6 @@ #include <QtQml/qtqmlglobal.h> #include <QtGui/qtguiglobal.h> #include <QtQuick/qtquick-config.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICK_LIB) -# define Q_QUICK_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICK_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICK_EXPORT -#endif - -QT_END_NAMESPACE +#include <QtQuick/qtquickexports.h> #endif // QTQUICKGLOBAL_H diff --git a/src/quick/qtquickglobal_p.h b/src/quick/qtquickglobal_p.h index 0ef394e739..5f10c69ed8 100644 --- a/src/quick/qtquickglobal_p.h +++ b/src/quick/qtquickglobal_p.h @@ -58,8 +58,7 @@ // #include "qtquickglobal.h" - -#define Q_QUICK_PRIVATE_EXPORT Q_QUICK_EXPORT +#include <QtQuick/private/qtquickexports_p.h> void Q_QUICK_PRIVATE_EXPORT qml_register_types_QtQuick(); diff --git a/src/quickdialogs2/quickdialogs2/CMakeLists.txt b/src/quickdialogs2/quickdialogs2/CMakeLists.txt index e01cd692c4..62caf151ba 100644 --- a/src/quickdialogs2/quickdialogs2/CMakeLists.txt +++ b/src/quickdialogs2/quickdialogs2/CMakeLists.txt @@ -33,6 +33,8 @@ qt_internal_add_qml_module(QuickDialogs2 Qt::Core Qt::Gui Qt::Quick + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_add_docs(QuickDialogs2 diff --git a/src/quickdialogs2/quickdialogs2/qtquickdialogs2global_p.h b/src/quickdialogs2/quickdialogs2/qtquickdialogs2global_p.h index cae55a95a3..ab4ec7f89f 100644 --- a/src/quickdialogs2/quickdialogs2/qtquickdialogs2global_p.h +++ b/src/quickdialogs2/quickdialogs2/qtquickdialogs2global_p.h @@ -50,19 +50,6 @@ #include <QtCore/qglobal.h> #include <QtQml/private/qqmlglobal_p.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKDIALOGS2_LIB) -# define Q_QUICKDIALOGS2_PRIVATE_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKDIALOGS2_PRIVATE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKDIALOGS2_PRIVATE_EXPORT -#endif - -QT_END_NAMESPACE +#include <QtQuickDialogs2/private/qtquickdialogs2exports_p.h> #endif // QTQUICKDIALOGS2GLOBAL_P_H diff --git a/src/quickdialogs2/quickdialogs2quickimpl/CMakeLists.txt b/src/quickdialogs2/quickdialogs2quickimpl/CMakeLists.txt index 20d090c84e..e85b8093e6 100644 --- a/src/quickdialogs2/quickdialogs2quickimpl/CMakeLists.txt +++ b/src/quickdialogs2/quickdialogs2quickimpl/CMakeLists.txt @@ -71,6 +71,8 @@ qt_internal_add_qml_module(QuickDialogs2QuickImpl Qt::Core Qt::Gui Qt::Quick + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) # Resources: diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qtquickdialogs2quickimplglobal_p.h b/src/quickdialogs2/quickdialogs2quickimpl/qtquickdialogs2quickimplglobal_p.h index 38b5a01bea..e67c3f1832 100644 --- a/src/quickdialogs2/quickdialogs2quickimpl/qtquickdialogs2quickimplglobal_p.h +++ b/src/quickdialogs2/quickdialogs2quickimpl/qtquickdialogs2quickimplglobal_p.h @@ -50,19 +50,6 @@ #include <QtCore/qglobal.h> #include <QtQml/private/qqmlglobal_p.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKDIALOGS2QUICKIMPL_LIB) -# define Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKDIALOGS2QUICKIMPL_PRIVATE_EXPORT -#endif - -QT_END_NAMESPACE +#include <QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplexports_p.h> #endif // QTQUICKDIALOGS2QUICKIMPLGLOBAL_P_H diff --git a/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt b/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt index 0242ffcf6c..7006feeb99 100644 --- a/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt +++ b/src/quickdialogs2/quickdialogs2utils/CMakeLists.txt @@ -20,4 +20,6 @@ qt_internal_add_module(QuickDialogs2Utils Qt::GuiPrivate PUBLIC_LIBRARIES Qt::Core + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h b/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h index 52f7a39784..a765090497 100644 --- a/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h +++ b/src/quickdialogs2/quickdialogs2utils/qtquickdialogs2utilsglobal_p.h @@ -49,19 +49,6 @@ // #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKDIALOGS2UTILS_LIB) -# define Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKDIALOGS2UTILS_PRIVATE_EXPORT -#endif - -QT_END_NAMESPACE +#include <QtQuickDialogs2Utils/private/qtquickdialogs2utilsexports_p.h> #endif // QTQUICKDIALOGS2UTILSUTILSGLOBAL_P_H diff --git a/src/quicklayouts/CMakeLists.txt b/src/quicklayouts/CMakeLists.txt index 4717756587..407e143347 100644 --- a/src/quicklayouts/CMakeLists.txt +++ b/src/quicklayouts/CMakeLists.txt @@ -20,4 +20,6 @@ qt_internal_add_qml_module(QuickLayouts Qt::GuiPrivate Qt::QuickPrivate Qt::Qml + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) diff --git a/src/quicklayouts/qquicklayout_p.h b/src/quicklayouts/qquicklayout_p.h index a7cbceb915..03f760c51e 100644 --- a/src/quicklayouts/qquicklayout_p.h +++ b/src/quicklayouts/qquicklayout_p.h @@ -64,7 +64,7 @@ class QQuickLayoutAttached; Q_DECLARE_LOGGING_CATEGORY(lcQuickLayouts) class QQuickLayoutPrivate; -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickLayout : public QQuickItem, public QQuickItemChangeListener +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickLayout : public QQuickItem, public QQuickItemChangeListener { Q_OBJECT @@ -177,7 +177,7 @@ protected: }; -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickLayoutAttached : public QObject +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickLayoutAttached : public QObject { Q_OBJECT Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged) diff --git a/src/quicklayouts/qquicklayoutglobal_p.h b/src/quicklayouts/qquicklayoutglobal_p.h index 7163d5a0d4..35729919c3 100644 --- a/src/quicklayouts/qquicklayoutglobal_p.h +++ b/src/quicklayouts/qquicklayoutglobal_p.h @@ -52,22 +52,6 @@ // #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#if !defined(QT_STATIC) -# if defined(QT_BUILD_QUICKLAYOUTS_LIB) -# define Q_QUICKLAYOUT_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKLAYOUT_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKLAYOUT_EXPORT -#endif - - -#define Q_QUICKLAYOUT_PRIVATE_EXPORT Q_QUICKLAYOUT_EXPORT - -QT_END_NAMESPACE +#include <QtQuickLayouts/private/qtquicklayoutsexports_p.h> #endif // QQUICKLAYOUTGLOBAL_P_H diff --git a/src/quicklayouts/qquicklinearlayout_p.h b/src/quicklayouts/qquicklinearlayout_p.h index 2373e7ad43..8cb2748bf0 100644 --- a/src/quicklayouts/qquicklinearlayout_p.h +++ b/src/quicklayouts/qquicklinearlayout_p.h @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE **/ class QQuickGridLayoutBasePrivate; -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickGridLayoutBase : public QQuickLayout +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickGridLayoutBase : public QQuickLayout { Q_OBJECT @@ -148,7 +148,7 @@ public: ** **/ class QQuickGridLayoutPrivate; -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickGridLayout : public QQuickGridLayoutBase +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickGridLayout : public QQuickGridLayoutBase { Q_OBJECT @@ -239,7 +239,7 @@ public: ** QQuickRowLayout ** **/ -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickRowLayout : public QQuickLinearLayout +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickRowLayout : public QQuickLinearLayout { Q_OBJECT QML_NAMED_ELEMENT(RowLayout) @@ -256,7 +256,7 @@ public: ** QQuickColumnLayout ** **/ -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickColumnLayout : public QQuickLinearLayout +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickColumnLayout : public QQuickLinearLayout { Q_OBJECT QML_NAMED_ELEMENT(ColumnLayout) diff --git a/src/quicklayouts/qquickstacklayout_p.h b/src/quicklayouts/qquickstacklayout_p.h index b09f2979e9..dc7ebe18ed 100644 --- a/src/quicklayouts/qquickstacklayout_p.h +++ b/src/quicklayouts/qquickstacklayout_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class QQuickStackLayoutPrivate; class QQuickStackLayoutAttached; -class Q_QUICKLAYOUT_PRIVATE_EXPORT QQuickStackLayout : public QQuickLayout +class Q_QUICKLAYOUTS_PRIVATE_EXPORT QQuickStackLayout : public QQuickLayout { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) diff --git a/src/quickshapes/CMakeLists.txt b/src/quickshapes/CMakeLists.txt index ed219d8728..3cf5285d57 100644 --- a/src/quickshapes/CMakeLists.txt +++ b/src/quickshapes/CMakeLists.txt @@ -23,6 +23,8 @@ qt_internal_add_qml_module(QuickShapesPrivate Qt::GuiPrivate Qt::Qml Qt::QuickPrivate + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) # We need to do additional initialization, so we have to provide our own diff --git a/src/quickshapes/qquickshapesglobal.h b/src/quickshapes/qquickshapesglobal.h index eb279c5d14..3d73c8c8ef 100644 --- a/src/quickshapes/qquickshapesglobal.h +++ b/src/quickshapes/qquickshapesglobal.h @@ -37,20 +37,7 @@ #define QQUICKSHAPESGLOBAL_H #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKSHAPES_LIB) -# define Q_QUICKSHAPES_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKSHAPES_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKSHAPES_EXPORT -#endif - -QT_END_NAMESPACE +#include <QtQuickShapes/qtquickshapesexports.h> #endif // QQUICKSHAPESGLOBAL_H diff --git a/src/quickshapes/qquickshapesglobal_p.h b/src/quickshapes/qquickshapesglobal_p.h index 40f6cfbdcf..ba9ee1486f 100644 --- a/src/quickshapes/qquickshapesglobal_p.h +++ b/src/quickshapes/qquickshapesglobal_p.h @@ -52,12 +52,7 @@ // #include "qquickshapesglobal.h" - -QT_BEGIN_NAMESPACE - -#define Q_QUICKSHAPES_PRIVATE_EXPORT Q_QUICKSHAPES_EXPORT - -QT_END_NAMESPACE +#include <QtQuickShapes/private/qtquickshapesexports_p.h> void Q_QUICKSHAPES_PRIVATE_EXPORT qml_register_types_QtQuick_Shapes(); diff --git a/src/quicktemplates2/CMakeLists.txt b/src/quicktemplates2/CMakeLists.txt index 3ddb994cc1..08489a8ab7 100644 --- a/src/quicktemplates2/CMakeLists.txt +++ b/src/quicktemplates2/CMakeLists.txt @@ -132,6 +132,8 @@ qt_internal_add_qml_module(QuickTemplates2 Qt::Core Qt::Gui Qt::Quick + GENERATE_CPP_EXPORTS + GENERATE_PRIVATE_CPP_EXPORTS ) qt_internal_extend_target(QuickTemplates2 CONDITION TARGET Qt::QmlModels diff --git a/src/quicktemplates2/qtquicktemplates2global_p.h b/src/quicktemplates2/qtquicktemplates2global_p.h index db848229d5..98e03e766c 100644 --- a/src/quicktemplates2/qtquicktemplates2global_p.h +++ b/src/quicktemplates2/qtquicktemplates2global_p.h @@ -51,19 +51,10 @@ #include <QtCore/qglobal.h> #include <QtQml/private/qqmlglobal_p.h> #include <QtQuickTemplates2/private/qtquicktemplates2-config_p.h> +#include <QtQuickTemplates2/private/qtquicktemplates2exports_p.h> QT_BEGIN_NAMESPACE -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKTEMPLATES2_LIB) -# define Q_QUICKTEMPLATES2_PRIVATE_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKTEMPLATES2_PRIVATE_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKTEMPLATES2_PRIVATE_EXPORT -#endif - Q_QUICKTEMPLATES2_PRIVATE_EXPORT void QQuickTemplates_initializeModule(); QT_END_NAMESPACE diff --git a/src/quickwidgets/CMakeLists.txt b/src/quickwidgets/CMakeLists.txt index 6cafb28980..4b6ebc0ad3 100644 --- a/src/quickwidgets/CMakeLists.txt +++ b/src/quickwidgets/CMakeLists.txt @@ -30,6 +30,7 @@ qt_internal_add_module(QuickWidgets Qt::QmlPrivate Qt::QuickPrivate Qt::WidgetsPrivate + GENERATE_CPP_EXPORTS ) qt_internal_extend_target(QuickWidgets CONDITION QT_FEATURE_accessibility diff --git a/src/quickwidgets/qtquickwidgetsglobal.h b/src/quickwidgets/qtquickwidgetsglobal.h index 3ca7389caf..dfe7989469 100644 --- a/src/quickwidgets/qtquickwidgetsglobal.h +++ b/src/quickwidgets/qtquickwidgetsglobal.h @@ -41,19 +41,6 @@ #define QTQUICKWIDGETSGLOBAL_H #include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_QUICKWIDGETS_LIB) -# define Q_QUICKWIDGETS_EXPORT Q_DECL_EXPORT -# else -# define Q_QUICKWIDGETS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_QUICKWIDGETS_EXPORT -#endif - -QT_END_NAMESPACE +#include <QtQuickWidgets/qtquickwidgetsexports.h> #endif // QTQUICKWIDGETSGLOBAL_H |