summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-06-17 19:29:21 -0700
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-25 15:32:25 +0000
commit781b0856a2362e400954adfa545a8455ecbd31cd (patch)
tree006779dbdce9867a226621fd0a9f587e72b367fc /src
parentc7448d6359d4510ac2f5aca850bf62492d6cb300 (diff)
qmetatype.h: remove unnecessary EXPORT macro
It was introduced in commit d9f9bc9bada91e3ec2b6c496d3b2242506ca56bc for Qt 6.0 to avoid extern __declspec(dllexport), which MSVC doesn't like, but was made obsolete by commit 77b99e8111cdd06b4fe12f2e18950a1e40ee2b76 that removed the extern templates altogether for MSVC. This change is NOT a no-op because Q_CORE_EXPORT expands to Q_DECL_IMPORT which is __attribute__((visibility("default"))) on ELF platforms. That's actually a good thing, because the symbol is not defined in any library that is not called QtCore anyway. GCC and Linux are also going towards properly requiring imported symbols to be explicitly marked, which this is. Task-number: QTBUG-93471 Change-Id: Id0fb9ab0089845ee8843fffd16f99616883281e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 97fbf7d151fbadb2c4541a5e0689810584a9a210) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qmetatype.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 219feac91f..3722e3f7a3 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -2377,14 +2377,8 @@ public:
*/
#if !defined(QT_BOOTSTRAPPED) && !defined(Q_CC_MSVC)
-#if !defined(QT_BUILD_CORE_LIB)
-#define QT_METATYPE_TEMPLATE_EXPORT Q_CORE_EXPORT
-#else
-#define QT_METATYPE_TEMPLATE_EXPORT
-#endif
-
-#define QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER(TypeName, Id, Name) \
- extern template class QT_METATYPE_TEMPLATE_EXPORT QMetaTypeForType<Name>;
+#define QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER(TypeName, Id, Name) \
+ extern template class Q_CORE_EXPORT QMetaTypeForType<Name>;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wattributes") // false positive because of QMetaTypeForType<void>
QT_FOR_EACH_STATIC_PRIMITIVE_TYPE(QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER)
@@ -2394,7 +2388,6 @@ QT_FOR_EACH_STATIC_CORE_CLASS(QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER)
QT_FOR_EACH_STATIC_CORE_POINTER(QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER)
QT_FOR_EACH_STATIC_CORE_TEMPLATE(QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER)
#undef QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER
-#undef QT_METATYPE_TEMPLATE_EXPORT
#endif
template<typename T>