QMetaType: remove qt_metaTypeArray and qt_incomplete_metaTypeArray

moc no longer generates code using them.

These were not in the QtPrivate namespace, but were undocumented. The
incomplete one was also quite clunky and hard to use, due to the Unique
type.

Change-Id: I27c8f752800756af91eafffd5282bc67becf2d2d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Thiago Macieira 2024-11-18 23:09:20 -08:00
parent 22bde5209a
commit 2da86477d0

View File

@ -2695,28 +2695,11 @@ constexpr const QMetaObject *QMetaType::metaObject() const
return d_ptr && d_ptr->metaObjectFn ? d_ptr->metaObjectFn(d_ptr) : nullptr;
}
template<typename... T>
constexpr const QtPrivate::QMetaTypeInterface *const qt_metaTypeArray[] = {
/*
Unique in qTryMetaTypeInterfaceForType does not have to be unique here
as we require _all_ types here to be actually complete.
We just want to have the additional type processing that exist in
QtPrivate::qTryMetaTypeInterfaceForType as opposed to the normal
QtPrivate::qMetaTypeInterfaceForType used in QMetaType::fromType
*/
QtPrivate::qTryMetaTypeInterfaceForType<void, QtPrivate::TypeAndForceComplete<T, std::true_type>>()...
};
constexpr const char *QMetaType::name() const
{
return d_ptr ? d_ptr->name : nullptr;
}
template<typename Unique,typename... T>
constexpr const QtPrivate::QMetaTypeInterface *const qt_incomplete_metaTypeArray[] = {
QtPrivate::qTryMetaTypeInterfaceForType<Unique, T>()...
};
inline size_t qHash(QMetaType type, size_t seed = 0)
{
// We cannot use d_ptr here since the same type in different DLLs