diff options
author | Marc Mutz <[email protected]> | 2022-04-01 09:39:11 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2022-04-05 13:47:15 +0200 |
commit | 53327f5751c8b203526ed753c2203c7de39eb965 (patch) | |
tree | b1bed202deb47b1f36b780d19ea48740bf4dd13d | |
parent | 2d85244802a08d7c037f746aaeced3159c379926 (diff) |
QtGui: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [1/2]: public API
It's one of our best tools to improve compile times.
Can't backport to Qt 6.3 or 6.2 because this change introduces new
exported symbols.
Task-number: QTBUG-102206
Change-Id: Ib8224ed60afa893744f369fe7394d27e89b66c11
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.h | 6 | ||||
-rw-r--r-- | src/gui/math3d/qgenericmatrix.cpp | 9 | ||||
-rw-r--r-- | src/gui/math3d/qgenericmatrix.h | 16 | ||||
-rw-r--r-- | src/gui/painting/qpagelayout.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qpagelayout.h | 6 | ||||
-rw-r--r-- | src/gui/painting/qpageranges.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpageranges.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qpagesize.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qpagesize.h | 6 | ||||
-rw-r--r-- | src/gui/text/qstatictext.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qstatictext.h | 2 |
12 files changed, 46 insertions, 18 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp index 9ed2557ad97..1a7e1d626b7 100644 --- a/src/gui/kernel/qplatformdialoghelper.cpp +++ b/src/gui/kernel/qplatformdialoghelper.cpp @@ -56,6 +56,11 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN_TAGGED(QPlatformDialogHelper::StandardButton, + QPlatformDialogHelper__StandardButton) +QT_IMPL_METATYPE_EXTERN_TAGGED(QPlatformDialogHelper::ButtonRole, + QPlatformDialogHelper__ButtonRole) + /*! \class QPlatformDialogHelper \since 5.0 diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index 1c30b27175b..12d2ec55084 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -176,8 +176,10 @@ Q_SIGNALS: }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QPlatformDialogHelper::StandardButton) -Q_DECLARE_METATYPE(QPlatformDialogHelper::ButtonRole) +QT_DECL_METATYPE_EXTERN_TAGGED(QPlatformDialogHelper::StandardButton, + QPlatformDialogHelper__StandardButton, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QPlatformDialogHelper::ButtonRole, + QPlatformDialogHelper__ButtonRole, Q_GUI_EXPORT) QT_BEGIN_NAMESPACE class Q_GUI_EXPORT QColorDialogOptions diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp index cf79ed97862..a5da81f0a8d 100644 --- a/src/gui/math3d/qgenericmatrix.cpp +++ b/src/gui/math3d/qgenericmatrix.cpp @@ -41,6 +41,15 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(QMatrix2x2) +QT_IMPL_METATYPE_EXTERN(QMatrix2x3) +QT_IMPL_METATYPE_EXTERN(QMatrix2x4) +QT_IMPL_METATYPE_EXTERN(QMatrix3x2) +QT_IMPL_METATYPE_EXTERN(QMatrix3x3) +QT_IMPL_METATYPE_EXTERN(QMatrix3x4) +QT_IMPL_METATYPE_EXTERN(QMatrix4x2) +QT_IMPL_METATYPE_EXTERN(QMatrix4x3) + /*! \class QGenericMatrix \brief The QGenericMatrix class is a template class that represents a NxM transformation matrix with N columns and M rows. diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h index 47a77d1e523..47a8ae755f7 100644 --- a/src/gui/math3d/qgenericmatrix.h +++ b/src/gui/math3d/qgenericmatrix.h @@ -381,13 +381,13 @@ QDataStream &operator>>(QDataStream &stream, QGenericMatrix<N, M, T> &matrix) QT_END_NAMESPACE -Q_DECLARE_METATYPE(QMatrix2x2) -Q_DECLARE_METATYPE(QMatrix2x3) -Q_DECLARE_METATYPE(QMatrix2x4) -Q_DECLARE_METATYPE(QMatrix3x2) -Q_DECLARE_METATYPE(QMatrix3x3) -Q_DECLARE_METATYPE(QMatrix3x4) -Q_DECLARE_METATYPE(QMatrix4x2) -Q_DECLARE_METATYPE(QMatrix4x3) +QT_DECL_METATYPE_EXTERN(QMatrix2x2, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix2x3, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix2x4, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix3x2, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix3x3, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix3x4, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix4x2, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(QMatrix4x3, Q_GUI_EXPORT) #endif diff --git a/src/gui/painting/qpagelayout.cpp b/src/gui/painting/qpagelayout.cpp index ddd5c9a15b4..feb3bf29f05 100644 --- a/src/gui/painting/qpagelayout.cpp +++ b/src/gui/painting/qpagelayout.cpp @@ -48,6 +48,10 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(QPageLayout) +QT_IMPL_METATYPE_EXTERN_TAGGED(QPageLayout::Unit, QPageLayout__Unit) +QT_IMPL_METATYPE_EXTERN_TAGGED(QPageLayout::Orientation, QPageLayout__Orientation) + // Multiplier for converting units to points. Q_GUI_EXPORT qreal qt_pointMultiplier(QPageLayout::Unit unit) { diff --git a/src/gui/painting/qpagelayout.h b/src/gui/painting/qpagelayout.h index 8d452411065..41f0fc7db71 100644 --- a/src/gui/painting/qpagelayout.h +++ b/src/gui/painting/qpagelayout.h @@ -149,8 +149,8 @@ Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QPageLayout &pageLayout); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QPageLayout) -Q_DECLARE_METATYPE(QPageLayout::Unit) -Q_DECLARE_METATYPE(QPageLayout::Orientation) +QT_DECL_METATYPE_EXTERN(QPageLayout, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QPageLayout::Unit, QPageLayout__Unit, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QPageLayout::Orientation, QPageLayout__Orientation, Q_GUI_EXPORT) #endif // QPAGELAYOUT_H diff --git a/src/gui/painting/qpageranges.cpp b/src/gui/painting/qpageranges.cpp index 29700376912..7212ee131cf 100644 --- a/src/gui/painting/qpageranges.cpp +++ b/src/gui/painting/qpageranges.cpp @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(QPageRanges) + void QPageRangesPrivate::mergeIntervals() { const int count = intervals.count(); diff --git a/src/gui/painting/qpageranges.h b/src/gui/painting/qpageranges.h index 11a30a95a5f..782039770ce 100644 --- a/src/gui/painting/qpageranges.h +++ b/src/gui/painting/qpageranges.h @@ -120,6 +120,6 @@ Q_DECLARE_TYPEINFO(QPageRanges::Range, Q_RELOCATABLE_TYPE); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QPageRanges) +QT_DECL_METATYPE_EXTERN(QPageRanges, Q_GUI_EXPORT) #endif // QPAGERANGES_H diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp index 5f4c87a1069..f10f58497c0 100644 --- a/src/gui/painting/qpagesize.cpp +++ b/src/gui/painting/qpagesize.cpp @@ -48,6 +48,10 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(QPageSize) +QT_IMPL_METATYPE_EXTERN_TAGGED(QPageSize::PageSizeId, QPageSize__PageSizeId) +QT_IMPL_METATYPE_EXTERN_TAGGED(QPageSize::Unit, QPageSize__Unit) + // Define the Windows DMPAPER sizes for use in the look-up table // See http://msdn.microsoft.com/en-us/library/windows/desktop/dd319099.aspx diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h index 569008f1668..63a40cdbea5 100644 --- a/src/gui/painting/qpagesize.h +++ b/src/gui/painting/qpagesize.h @@ -304,8 +304,8 @@ Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QPageSize &pageSize); QT_END_NAMESPACE -Q_DECLARE_METATYPE(QPageSize) -Q_DECLARE_METATYPE(QPageSize::PageSizeId) -Q_DECLARE_METATYPE(QPageSize::Unit) +QT_DECL_METATYPE_EXTERN(QPageSize, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QPageSize::PageSizeId, QPageSize__PageSizeId, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QPageSize::Unit, QPageSize__Unit, Q_GUI_EXPORT) #endif // QPAGESIZE_H diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index b702764688e..2575fbc3cdb 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(QStaticText) + QStaticTextUserData::~QStaticTextUserData() { } diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index aafc43ed566..38296e296ee 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -103,6 +103,6 @@ Q_DECLARE_SHARED(QStaticText) QT_END_NAMESPACE -Q_DECLARE_METATYPE(QStaticText) +QT_DECL_METATYPE_EXTERN(QStaticText, Q_GUI_EXPORT) #endif // QSTATICTEXT_H |