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.

Pick-to: 6.3
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>
This commit is contained in:
Marc Mutz 2022-04-01 09:39:11 +02:00
parent 53327f5751
commit 1c9f990332
14 changed files with 82 additions and 37 deletions

View File

@ -49,6 +49,24 @@
#ifndef QT_NO_ACCESSIBILITY #ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QT_IMPL_METATYPE_EXTERN(QSpiIntList)
QT_IMPL_METATYPE_EXTERN(QSpiUIntList)
QT_IMPL_METATYPE_EXTERN(QSpiObjectReference)
QT_IMPL_METATYPE_EXTERN(QSpiObjectReferenceArray)
QT_IMPL_METATYPE_EXTERN(QSpiAccessibleCacheItem)
QT_IMPL_METATYPE_EXTERN(QSpiAccessibleCacheArray)
QT_IMPL_METATYPE_EXTERN(QSpiAction)
QT_IMPL_METATYPE_EXTERN(QSpiActionArray)
QT_IMPL_METATYPE_EXTERN(QSpiEventListener)
QT_IMPL_METATYPE_EXTERN(QSpiEventListenerArray)
QT_IMPL_METATYPE_EXTERN(QSpiRelationArrayEntry)
QT_IMPL_METATYPE_EXTERN(QSpiRelationArray)
QT_IMPL_METATYPE_EXTERN(QSpiTextRange)
QT_IMPL_METATYPE_EXTERN(QSpiTextRangeList)
QT_IMPL_METATYPE_EXTERN(QSpiAttributeSet)
QT_IMPL_METATYPE_EXTERN(QSpiAppUpdate)
QT_IMPL_METATYPE_EXTERN(QSpiDeviceEvent)
QSpiObjectReference::QSpiObjectReference() QSpiObjectReference::QSpiObjectReference()
: path(QDBusObjectPath(ATSPI_DBUS_PATH_NULL)) : path(QDBusObjectPath(ATSPI_DBUS_PATH_NULL))
{} {}

View File

@ -176,23 +176,23 @@ void qSpiInitializeStructTypes();
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_METATYPE(QSpiIntList) QT_DECL_METATYPE_EXTERN(QSpiIntList, /* not exported */)
Q_DECLARE_METATYPE(QSpiUIntList) QT_DECL_METATYPE_EXTERN(QSpiUIntList, /* not exported */)
Q_DECLARE_METATYPE(QSpiObjectReference) QT_DECL_METATYPE_EXTERN(QSpiObjectReference, /* not exported */)
Q_DECLARE_METATYPE(QSpiObjectReferenceArray) QT_DECL_METATYPE_EXTERN(QSpiObjectReferenceArray, /* not exported */)
Q_DECLARE_METATYPE(QSpiAccessibleCacheItem) QT_DECL_METATYPE_EXTERN(QSpiAccessibleCacheItem, /* not exported */)
Q_DECLARE_METATYPE(QSpiAccessibleCacheArray) QT_DECL_METATYPE_EXTERN(QSpiAccessibleCacheArray, /* not exported */)
Q_DECLARE_METATYPE(QSpiAction) QT_DECL_METATYPE_EXTERN(QSpiAction, /* not exported */)
Q_DECLARE_METATYPE(QSpiActionArray) QT_DECL_METATYPE_EXTERN(QSpiActionArray, /* not exported */)
Q_DECLARE_METATYPE(QSpiEventListener) QT_DECL_METATYPE_EXTERN(QSpiEventListener, /* not exported */)
Q_DECLARE_METATYPE(QSpiEventListenerArray) QT_DECL_METATYPE_EXTERN(QSpiEventListenerArray, /* not exported */)
Q_DECLARE_METATYPE(QSpiRelationArrayEntry) QT_DECL_METATYPE_EXTERN(QSpiRelationArrayEntry, /* not exported */)
Q_DECLARE_METATYPE(QSpiRelationArray) QT_DECL_METATYPE_EXTERN(QSpiRelationArray, /* not exported */)
Q_DECLARE_METATYPE(QSpiTextRange) QT_DECL_METATYPE_EXTERN(QSpiTextRange, /* not exported */)
Q_DECLARE_METATYPE(QSpiTextRangeList) QT_DECL_METATYPE_EXTERN(QSpiTextRangeList, /* not exported */)
Q_DECLARE_METATYPE(QSpiAttributeSet) QT_DECL_METATYPE_EXTERN(QSpiAttributeSet, /* not exported */)
Q_DECLARE_METATYPE(QSpiAppUpdate) QT_DECL_METATYPE_EXTERN(QSpiAppUpdate, /* not exported */)
Q_DECLARE_METATYPE(QSpiDeviceEvent) QT_DECL_METATYPE_EXTERN(QSpiDeviceEvent, /* not exported */)
// For qdbusxml2cpp-generated code // For qdbusxml2cpp-generated code
QT_USE_NAMESPACE QT_USE_NAMESPACE

View File

@ -42,6 +42,8 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QT_IMPL_METATYPE_EXTERN_TAGGED(QInputDeviceManager::DeviceType, QInputDeviceManager__DeviceType)
/*! /*!
\class QInputDeviceManager \class QInputDeviceManager
\internal \internal

View File

@ -91,6 +91,7 @@ Q_SIGNALS:
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_METATYPE(QInputDeviceManager::DeviceType) QT_DECL_METATYPE_EXTERN_TAGGED(QInputDeviceManager::DeviceType,
QInputDeviceManager__DeviceType, Q_GUI_EXPORT)
#endif // QINPUTDEVICEMANAGER_P_H #endif // QINPUTDEVICEMANAGER_P_H

View File

@ -56,6 +56,16 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QT_IMPL_METATYPE_EXTERN(QDBusMenuItem)
QT_IMPL_METATYPE_EXTERN(QDBusMenuItemList)
QT_IMPL_METATYPE_EXTERN(QDBusMenuItemKeys)
QT_IMPL_METATYPE_EXTERN(QDBusMenuItemKeysList)
QT_IMPL_METATYPE_EXTERN(QDBusMenuLayoutItem)
QT_IMPL_METATYPE_EXTERN(QDBusMenuLayoutItemList)
QT_IMPL_METATYPE_EXTERN(QDBusMenuEvent)
QT_IMPL_METATYPE_EXTERN(QDBusMenuEventList)
QT_IMPL_METATYPE_EXTERN(QDBusMenuShortcut)
const QDBusArgument &operator<<(QDBusArgument &arg, const QDBusMenuItem &item) const QDBusArgument &operator<<(QDBusArgument &arg, const QDBusMenuItem &item)
{ {
arg.beginStructure(); arg.beginStructure();

View File

@ -143,14 +143,14 @@ QDebug operator<<(QDebug d, const QDBusMenuLayoutItem &item);
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDBusMenuItem) QT_DECL_METATYPE_EXTERN(QDBusMenuItem, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuItemList) QT_DECL_METATYPE_EXTERN(QDBusMenuItemList, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuItemKeys) QT_DECL_METATYPE_EXTERN(QDBusMenuItemKeys, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuItemKeysList) QT_DECL_METATYPE_EXTERN(QDBusMenuItemKeysList, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuLayoutItem) QT_DECL_METATYPE_EXTERN(QDBusMenuLayoutItem, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuLayoutItemList) QT_DECL_METATYPE_EXTERN(QDBusMenuLayoutItemList, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuEvent) QT_DECL_METATYPE_EXTERN(QDBusMenuEvent, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuEventList) QT_DECL_METATYPE_EXTERN(QDBusMenuEventList, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QDBusMenuShortcut) QT_DECL_METATYPE_EXTERN(QDBusMenuShortcut, Q_GUI_EXPORT)
#endif #endif

View File

@ -59,6 +59,10 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QT_IMPL_METATYPE_EXTERN(QXdgDBusImageStruct)
QT_IMPL_METATYPE_EXTERN(QXdgDBusImageVector)
QT_IMPL_METATYPE_EXTERN(QXdgDBusToolTipStruct)
static const int IconSizeLimit = 64; static const int IconSizeLimit = 64;
static const int IconNormalSmallSize = 22; static const int IconNormalSmallSize = 22;
static const int IconNormalMediumSize = 64; static const int IconNormalMediumSize = 64;

View File

@ -102,8 +102,8 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, QXdgDBusToolTipSt
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_METATYPE(QXdgDBusImageStruct) QT_DECL_METATYPE_EXTERN(QXdgDBusImageStruct, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QXdgDBusImageVector) QT_DECL_METATYPE_EXTERN(QXdgDBusImageVector, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QXdgDBusToolTipStruct) QT_DECL_METATYPE_EXTERN(QXdgDBusToolTipStruct, Q_GUI_EXPORT)
#endif // QDBUSTRAYTYPES_P_H #endif // QDBUSTRAYTYPES_P_H

View File

@ -64,6 +64,9 @@
QT_BEGIN_NAMESPACE 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 // this could become a list of all languages used for each writing
// system, instead of using the single most common language. // system, instead of using the single most common language.
static const char languageForWritingSystem[][8] = { static const char languageForWritingSystem[][8] = {

View File

@ -60,8 +60,8 @@
Q_FORWARD_DECLARE_CF_TYPE(CTFontDescriptor); Q_FORWARD_DECLARE_CF_TYPE(CTFontDescriptor);
Q_FORWARD_DECLARE_CF_TYPE(CTFont); Q_FORWARD_DECLARE_CF_TYPE(CTFont);
Q_DECLARE_METATYPE(QCFType<CGFontRef>); QT_DECL_METATYPE_EXTERN_TAGGED(QCFType<CGFontRef>, QCFType_CGFontRef, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(QCFType<CFURLRef>); QT_DECL_METATYPE_EXTERN_TAGGED(QCFType<CFURLRef>, QCFType_CFURLRef, Q_GUI_EXPORT)
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@ -55,6 +55,10 @@
QT_BEGIN_NAMESPACE 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" #include "qcssscanner.cpp"
using namespace QCss; using namespace QCss;

View File

@ -885,9 +885,9 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_METATYPE( QCss::BackgroundData ) QT_DECL_METATYPE_EXTERN_TAGGED(QCss::BackgroundData, QCss__BackgroundData, Q_GUI_EXPORT)
Q_DECLARE_METATYPE( QCss::LengthData ) QT_DECL_METATYPE_EXTERN_TAGGED(QCss::LengthData, QCss__LengthData, Q_GUI_EXPORT)
Q_DECLARE_METATYPE( QCss::BorderData ) QT_DECL_METATYPE_EXTERN_TAGGED(QCss::BorderData, QCss__BorderData, Q_GUI_EXPORT)
#undef QT_CSS_DECLARE_TYPEINFO #undef QT_CSS_DECLARE_TYPEINFO

View File

@ -74,6 +74,9 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QT_IMPL_METATYPE_EXTERN(HFONT)
QT_IMPL_METATYPE_EXTERN(LOGFONT)
//### mingw needed define //### mingw needed define
#ifndef TT_PRIM_CSPLINE #ifndef TT_PRIM_CSPLINE
#define TT_PRIM_CSPLINE 3 #define TT_PRIM_CSPLINE 3

View File

@ -174,7 +174,7 @@ private:
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_METATYPE(HFONT) QT_DECL_METATYPE_EXTERN(HFONT, Q_GUI_EXPORT)
Q_DECLARE_METATYPE(LOGFONT) QT_DECL_METATYPE_EXTERN(LOGFONT, Q_GUI_EXPORT)
#endif // QWINDOWSFONTENGINE_H #endif // QWINDOWSFONTENGINE_H