From 438c8e503d6d5d9d97afafdbd509126cc1db935d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 26 Nov 2024 11:33:20 -0800 Subject: [PATCH] qfloat16: simplify the legacy EXTERN_TAGGED content and mark for removal Amends 21950e3085bd45dbd4b55fb76e3d47319cbb11d7. This functionality was an ill-advised attempt at reducing compilation times that added more legacy we have to keep until 7.0, instead of properly fixing QMetaTypes. qfloat16 is a built-in type whose name in the macro and the one obtained from C++ match ("qfloat16"), and has no legacy operations to be registered. This function only needs to return the ID. Change-Id: I2a8300dd44bcfc1a2479fffd2f76964206b9e58a Reviewed-by: Fabian Kosmale Reviewed-by: Marc Mutz --- src/corelib/global/qfloat16.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp index d22c4f48b3f..86c96324f92 100644 --- a/src/corelib/global/qfloat16.cpp +++ b/src/corelib/global/qfloat16.cpp @@ -10,10 +10,14 @@ #include #include -QT_DECL_METATYPE_EXTERN(qfloat16, Q_CORE_EXPORT) QT_BEGIN_NAMESPACE -QT_IMPL_METATYPE_EXTERN(qfloat16) +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) +Q_DECL_EXPORT int qRegisterNormalizedMetaType_qfloat16(const QByteArray &) +{ + return QMetaType::Float16; +} +#endif /*! \class qfloat16