summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qlocale.cpp7
-rw-r--r--src/corelib/text/qlocale_p.h11
-rw-r--r--src/opengl/qopengldebug.cpp2
-rw-r--r--src/opengl/qopengldebug.h2
-rw-r--r--src/printsupport/kernel/qcups.cpp10
-rw-r--r--src/printsupport/kernel/qcups_p.h14
-rw-r--r--src/printsupport/kernel/qprint_p.h1
-rw-r--r--src/printsupport/kernel/qprintengine.h1
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp1
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h6
-rw-r--r--src/widgets/kernel/qgesture.cpp7
-rw-r--r--src/widgets/kernel/qgesture.h13
-rw-r--r--src/widgets/util/qscrollerproperties.cpp5
-rw-r--r--src/widgets/util/qscrollerproperties.h6
15 files changed, 67 insertions, 21 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp
index 69249012f5..1f2a0b62e2 100644
--- a/src/corelib/text/qlocale.cpp
+++ b/src/corelib/text/qlocale.cpp
@@ -84,6 +84,13 @@ QT_WARNING_DISABLE_GCC("-Wfree-nonheap-object") // false positive tracking
QT_BEGIN_NAMESPACE
+QT_IMPL_METATYPE_EXTERN(QStringView)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QList<Qt::DayOfWeek>, QList_Qt__DayOfWeek)
+#ifndef QT_NO_SYSTEMLOCALE
+QT_IMPL_METATYPE_EXTERN_TAGGED(QSystemLocale::CurrencyToStringArgument,
+ QSystemLocale__CurrencyToStringArgument)
+#endif
+
using namespace Qt::StringLiterals;
#ifndef QT_NO_SYSTEMLOCALE
diff --git a/src/corelib/text/qlocale_p.h b/src/corelib/text/qlocale_p.h
index 679bd136e9..87c78bb91a 100644
--- a/src/corelib/text/qlocale_p.h
+++ b/src/corelib/text/qlocale_p.h
@@ -58,7 +58,7 @@
#include "QtCore/qvariant.h"
#include "QtCore/qnumeric.h"
#include <QtCore/qcalendar.h>
-#include <QtCore/QList> // Q_DECLARE_METATYPE(QList<Qt::DayOfWeek>)
+#include <QtCore/qcontainerfwd.h>
#include "qlocale.h"
@@ -544,10 +544,13 @@ static_assert(!ascii_isspace(uchar('\377')));
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QStringView)
-Q_DECLARE_METATYPE(QList<Qt::DayOfWeek>)
+// ### move to qstringview.h
+QT_DECL_METATYPE_EXTERN(QStringView, Q_CORE_EXPORT)
+// ### move to qnamespace.h
+QT_DECL_METATYPE_EXTERN_TAGGED(QList<Qt::DayOfWeek>, QList_Qt__DayOfWeek, Q_CORE_EXPORT)
#ifndef QT_NO_SYSTEMLOCALE
-Q_DECLARE_METATYPE(QSystemLocale::CurrencyToStringArgument)
+QT_DECL_METATYPE_EXTERN_TAGGED(QSystemLocale::CurrencyToStringArgument,
+ QSystemLocale__CurrencyToStringArgument, Q_CORE_EXPORT)
#endif
#endif // QLOCALE_P_H
diff --git a/src/opengl/qopengldebug.cpp b/src/opengl/qopengldebug.cpp
index 3df1f2f29a..e9c6fc9181 100644
--- a/src/opengl/qopengldebug.cpp
+++ b/src/opengl/qopengldebug.cpp
@@ -48,6 +48,8 @@
QT_BEGIN_NAMESPACE
+QT_IMPL_METATYPE_EXTERN(QOpenGLDebugMessage)
+
/*!
\class QOpenGLDebugMessage
\brief The QOpenGLDebugMessage class wraps an OpenGL debug message.
diff --git a/src/opengl/qopengldebug.h b/src/opengl/qopengldebug.h
index 34706a09dc..152d60e873 100644
--- a/src/opengl/qopengldebug.h
+++ b/src/opengl/qopengldebug.h
@@ -213,7 +213,7 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QOpenGLDebugMessage)
+QT_DECL_METATYPE_EXTERN(QOpenGLDebugMessage, Q_OPENGL_EXPORT)
#endif // QT_NO_OPENGL
diff --git a/src/printsupport/kernel/qcups.cpp b/src/printsupport/kernel/qcups.cpp
index bf80b6a586..f2a8f3503a 100644
--- a/src/printsupport/kernel/qcups.cpp
+++ b/src/printsupport/kernel/qcups.cpp
@@ -44,6 +44,16 @@
QT_BEGIN_NAMESPACE
+QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::JobHoldUntil,
+ QCUPSSupport__JobHoldUntil)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::BannerPage,
+ QCUPSSupport__BannerPage)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::PageSet, QCUPSSupport__PageSet)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::PagesPerSheetLayout,
+ QCUPSSupport__PagesPerSheetLayout)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QCUPSSupport::PagesPerSheet,
+ QCUPSSupport__PagesPerSheet)
+
static QStringList cupsOptionsList(QPrinter *printer) noexcept
{
return printer->printEngine()->property(PPK_CupsOptions).toStringList();
diff --git a/src/printsupport/kernel/qcups_p.h b/src/printsupport/kernel/qcups_p.h
index 4d72230b90..0034a849c2 100644
--- a/src/printsupport/kernel/qcups_p.h
+++ b/src/printsupport/kernel/qcups_p.h
@@ -177,10 +177,14 @@ Q_DECLARE_TYPEINFO(QCUPSSupport::PagesPerSheet, Q_PRIMITIVE_TYPE);
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QCUPSSupport::JobHoldUntil)
-Q_DECLARE_METATYPE(QCUPSSupport::BannerPage)
-Q_DECLARE_METATYPE(QCUPSSupport::PageSet)
-Q_DECLARE_METATYPE(QCUPSSupport::PagesPerSheetLayout)
-Q_DECLARE_METATYPE(QCUPSSupport::PagesPerSheet)
+QT_DECL_METATYPE_EXTERN_TAGGED(QCUPSSupport::JobHoldUntil,
+ QCUPSSupport__JobHoldUntil, Q_PRINTSUPPORT_EXPORT)
+QT_DECL_METATYPE_EXTERN_TAGGED(QCUPSSupport::BannerPage,
+ QCUPSSupport__BannerPage, Q_PRINTSUPPORT_EXPORT)
+QT_DECL_METATYPE_EXTERN_TAGGED(QCUPSSupport::PageSet, QCUPSSupport__PageSet, Q_PRINTSUPPORT_EXPORT)
+QT_DECL_METATYPE_EXTERN_TAGGED(QCUPSSupport::PagesPerSheetLayout,
+ QCUPSSupport__PagesPerSheetLayout, Q_PRINTSUPPORT_EXPORT)
+QT_DECL_METATYPE_EXTERN_TAGGED(QCUPSSupport::PagesPerSheet,
+ QCUPSSupport__PagesPerSheet, Q_PRINTSUPPORT_EXPORT)
#endif
diff --git a/src/printsupport/kernel/qprint_p.h b/src/printsupport/kernel/qprint_p.h
index 4956775461..cc30536171 100644
--- a/src/printsupport/kernel/qprint_p.h
+++ b/src/printsupport/kernel/qprint_p.h
@@ -59,6 +59,7 @@
#if (defined Q_OS_MACOS) || (defined Q_OS_UNIX && QT_CONFIG(cups))
#include <cups/ppd.h> // Use for type defs only, don't want to actually link in main module
+// ### QT_DECL_METATYPE_EXTERN_TAGGED once there's a qprint.cpp TU
Q_DECLARE_METATYPE(ppd_file_t *)
#endif
diff --git a/src/printsupport/kernel/qprintengine.h b/src/printsupport/kernel/qprintengine.h
index 698f7548cf..f59ab18e0a 100644
--- a/src/printsupport/kernel/qprintengine.h
+++ b/src/printsupport/kernel/qprintengine.h
@@ -44,6 +44,7 @@
#include <QtCore/qvariant.h>
#include <QtPrintSupport/qprinter.h>
+// ### move to qmargins.h
Q_DECLARE_METATYPE(QMarginsF)
QT_BEGIN_NAMESPACE
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index de180adba1..6ac8907b4b 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -60,6 +60,7 @@
#include <vssym32.h>
#include <dwmapi.h>
+// ### move to qmargins.h
Q_DECLARE_METATYPE(QMargins)
#ifndef WM_DWMCOMPOSITIONCHANGED
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 4ead3d88e1..bc7ab42fe3 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -829,6 +829,8 @@
QT_BEGIN_NAMESPACE
+QT_IMPL_METATYPE_EXTERN_TAGGED(QGraphicsItem*, QGraphicsItem_ptr)
+
static inline void _q_adjustRect(QRect *rect)
{
Q_ASSERT(rect);
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index 18d92c62aa..cce7d5626b 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -1032,10 +1032,6 @@ Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QGraphicsItem *)
-
-QT_BEGIN_NAMESPACE
-
-QT_END_NAMESPACE
+QT_DECL_METATYPE_EXTERN_TAGGED(QGraphicsItem*, QGraphicsItem_ptr, Q_WIDGETS_EXPORT)
#endif // QGRAPHICSITEM_H
diff --git a/src/widgets/kernel/qgesture.cpp b/src/widgets/kernel/qgesture.cpp
index bde5484771..759d699f04 100644
--- a/src/widgets/kernel/qgesture.cpp
+++ b/src/widgets/kernel/qgesture.cpp
@@ -49,6 +49,13 @@
QT_BEGIN_NAMESPACE
+QT_IMPL_METATYPE_EXTERN_TAGGED(Qt::GestureState, Qt__GestureState)
+QT_IMPL_METATYPE_EXTERN_TAGGED(Qt::GestureType, Qt__GestureType)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QPinchGesture::ChangeFlags,
+ QPinchGesture__ChangeFlags)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QGesture::GestureCancelPolicy,
+ QGesture__GestureCancelPolicy)
+
/*!
\class QGesture
\since 4.6
diff --git a/src/widgets/kernel/qgesture.h b/src/widgets/kernel/qgesture.h
index a22db41ade..d28fed32cc 100644
--- a/src/widgets/kernel/qgesture.h
+++ b/src/widgets/kernel/qgesture.h
@@ -52,8 +52,10 @@
#ifndef QT_NO_GESTURES
-Q_DECLARE_METATYPE(Qt::GestureState)
-Q_DECLARE_METATYPE(Qt::GestureType)
+// ### move to qnamespace.h
+QT_DECL_METATYPE_EXTERN_TAGGED(Qt::GestureState, Qt__GestureState, Q_WIDGETS_EXPORT)
+// ### move to qnamespace.h
+QT_DECL_METATYPE_EXTERN_TAGGED(Qt::GestureType, Qt__GestureType, Q_WIDGETS_EXPORT)
QT_BEGIN_NAMESPACE
@@ -201,7 +203,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QPinchGesture::ChangeFlags)
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QPinchGesture::ChangeFlags)
+QT_DECL_METATYPE_EXTERN_TAGGED(QPinchGesture::ChangeFlags,
+ QPinchGesture__ChangeFlags, Q_WIDGETS_EXPORT)
QT_BEGIN_NAMESPACE
@@ -324,7 +327,9 @@ Q_WIDGETS_EXPORT QDebug operator<<(QDebug, const QGestureEvent *);
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QGesture::GestureCancelPolicy)
+QT_DECL_METATYPE_EXTERN_TAGGED(QGesture::GestureCancelPolicy,
+ QGesture__GestureCancelPolicy, Q_WIDGETS_EXPORT)
+
#endif // QT_NO_GESTURES
#endif // QGESTURE_H
diff --git a/src/widgets/util/qscrollerproperties.cpp b/src/widgets/util/qscrollerproperties.cpp
index 4c87448a7d..89e73d4088 100644
--- a/src/widgets/util/qscrollerproperties.cpp
+++ b/src/widgets/util/qscrollerproperties.cpp
@@ -46,6 +46,11 @@
QT_BEGIN_NAMESPACE
+QT_IMPL_METATYPE_EXTERN_TAGGED(QScrollerProperties::OvershootPolicy,
+ QScrollerProperties__OvershootPolicy)
+QT_IMPL_METATYPE_EXTERN_TAGGED(QScrollerProperties::FrameRates,
+ QScrollerProperties__FrameRates)
+
static QScrollerPropertiesPrivate *userDefaults = nullptr;
static QScrollerPropertiesPrivate *systemDefaults = nullptr;
diff --git a/src/widgets/util/qscrollerproperties.h b/src/widgets/util/qscrollerproperties.h
index 2fc1a5dc18..2ae10a62b7 100644
--- a/src/widgets/util/qscrollerproperties.h
+++ b/src/widgets/util/qscrollerproperties.h
@@ -130,7 +130,9 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QScrollerProperties::OvershootPolicy)
-Q_DECLARE_METATYPE(QScrollerProperties::FrameRates)
+QT_DECL_METATYPE_EXTERN_TAGGED(QScrollerProperties::OvershootPolicy,
+ QScrollerProperties__OvershootPolicy, Q_WIDGETS_EXPORT)
+QT_DECL_METATYPE_EXTERN_TAGGED(QScrollerProperties::FrameRates,
+ QScrollerProperties__FrameRates, Q_WIDGETS_EXPORT)
#endif // QSCROLLERPROPERTIES_H