diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-04-01 09:39:11 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-04-05 19:57:59 +0000 |
commit | 32a2b8a589e220eaa46e7c2a738679476e4f3341 (patch) | |
tree | 19956ff07882e2f44297aeea32c0963d7b56d1a9 /src/gui/text | |
parent | 436d42b77faf4719f23c2f71902079ddc9273747 (diff) |
QtGui: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [2/2]: private API
It's one of our best tools to improve compile times.
Can't backport to Qt 6.2 because the macros don't exist there.
Task-number: QTBUG-102206
Change-Id: I80734b4d43928fce0e66329b5b897a2738db9b30
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1c9f990332d54c3ba9faa93e01f875409582f677)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/coretext/qcoretextfontdatabase.mm | 3 | ||||
-rw-r--r-- | src/gui/text/coretext/qcoretextfontdatabase_p.h | 4 | ||||
-rw-r--r-- | src/gui/text/qcssparser.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qcssparser_p.h | 6 | ||||
-rw-r--r-- | src/gui/text/windows/qwindowsfontengine.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/windows/qwindowsfontengine_p.h | 4 |
6 files changed, 17 insertions, 7 deletions
diff --git a/src/gui/text/coretext/qcoretextfontdatabase.mm b/src/gui/text/coretext/qcoretextfontdatabase.mm index af0ec05e1a..bab3bd7c2b 100644 --- a/src/gui/text/coretext/qcoretextfontdatabase.mm +++ b/src/gui/text/coretext/qcoretextfontdatabase.mm @@ -62,6 +62,9 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN_TAGGED(QCFType<CGFontRef>, QCFType_CGFontRef) +QT_IMPL_METATYPE_EXTERN_TAGGED(QCFType<CFURLRef>, QCFType_CFURLRef) + // this could become a list of all languages used for each writing // system, instead of using the single most common language. static const char languageForWritingSystem[][8] = { diff --git a/src/gui/text/coretext/qcoretextfontdatabase_p.h b/src/gui/text/coretext/qcoretextfontdatabase_p.h index a6f93dd14a..c8e8294f91 100644 --- a/src/gui/text/coretext/qcoretextfontdatabase_p.h +++ b/src/gui/text/coretext/qcoretextfontdatabase_p.h @@ -60,8 +60,8 @@ Q_FORWARD_DECLARE_CF_TYPE(CTFontDescriptor); Q_FORWARD_DECLARE_CF_TYPE(CTFont); -Q_DECLARE_METATYPE(QCFType<CGFontRef>); -Q_DECLARE_METATYPE(QCFType<CFURLRef>); +QT_DECL_METATYPE_EXTERN_TAGGED(QCFType<CGFontRef>, QCFType_CGFontRef, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QCFType<CFURLRef>, QCFType_CFURLRef, Q_GUI_EXPORT) QT_BEGIN_NAMESPACE diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index 283c3d346d..906011f01b 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -54,6 +54,10 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN_TAGGED(QCss::BackgroundData, QCss__BackgroundData) +QT_IMPL_METATYPE_EXTERN_TAGGED(QCss::LengthData, QCss__LengthData) +QT_IMPL_METATYPE_EXTERN_TAGGED(QCss::BorderData, QCss__BorderData) + #include "qcssscanner.cpp" using namespace QCss; diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h index 8275dc055e..7af2efd7f7 100644 --- a/src/gui/text/qcssparser_p.h +++ b/src/gui/text/qcssparser_p.h @@ -885,9 +885,9 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE( QCss::BackgroundData ) -Q_DECLARE_METATYPE( QCss::LengthData ) -Q_DECLARE_METATYPE( QCss::BorderData ) +QT_DECL_METATYPE_EXTERN_TAGGED(QCss::BackgroundData, QCss__BackgroundData, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QCss::LengthData, QCss__LengthData, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN_TAGGED(QCss::BorderData, QCss__BorderData, Q_GUI_EXPORT) #undef QT_CSS_DECLARE_TYPEINFO diff --git a/src/gui/text/windows/qwindowsfontengine.cpp b/src/gui/text/windows/qwindowsfontengine.cpp index 1f1fb7c6fa..f8125511d5 100644 --- a/src/gui/text/windows/qwindowsfontengine.cpp +++ b/src/gui/text/windows/qwindowsfontengine.cpp @@ -74,6 +74,9 @@ QT_BEGIN_NAMESPACE +QT_IMPL_METATYPE_EXTERN(HFONT) +QT_IMPL_METATYPE_EXTERN(LOGFONT) + //### mingw needed define #ifndef TT_PRIM_CSPLINE #define TT_PRIM_CSPLINE 3 diff --git a/src/gui/text/windows/qwindowsfontengine_p.h b/src/gui/text/windows/qwindowsfontengine_p.h index 57b619bc1c..790c309dd3 100644 --- a/src/gui/text/windows/qwindowsfontengine_p.h +++ b/src/gui/text/windows/qwindowsfontengine_p.h @@ -174,7 +174,7 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(HFONT) -Q_DECLARE_METATYPE(LOGFONT) +QT_DECL_METATYPE_EXTERN(HFONT, Q_GUI_EXPORT) +QT_DECL_METATYPE_EXTERN(LOGFONT, Q_GUI_EXPORT) #endif // QWINDOWSFONTENGINE_H |