summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-02-21 13:48:50 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-03-03 14:14:06 +0100
commite65345afb127b21cdc80752ace498bd3fe853577 (patch)
treeb4c773cb683127f8dececceffc5234d569947a5d /src/corelib/kernel
parentcf000d080c61cde44bd84e53ee018f36e33b7257 (diff)
MSVC: Suppress warning C4910 for exported extern templates
Warnings like the following started showing up in dev after 3c0cd7566cf858d0fd23fecad5ef9faec798cf5f. Not a problem in CI but it is treated as an error in develop-builds, suppress them for now since it still manages to build. warning C4910: 'QtPrivate::QMetaTypeForType<bool>': '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation Amends 3c0cd7566cf858d0fd23fecad5ef9faec798cf5f Task-number: QTBUG-82403 Change-Id: I1ee6731afafd4636102a49555d4d892f39a21bc7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qmetatype.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 424065d247..56b2474d04 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -2737,6 +2737,8 @@ class QMetaTypeForType<void>
#define QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER(TypeName, Id, Name) \
extern template class Q_CORE_EXPORT QMetaTypeForType<Name>;
QT_WARNING_PUSH
+QT_WARNING_DISABLE_MSVC(4910) // '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
+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)
QT_WARNING_POP
@@ -2744,6 +2746,7 @@ QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER)
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)
+QT_WARNING_POP
#undef QT_METATYPE_DECLARE_EXTERN_TEMPLATE_ITER
#endif