QTypeInfo: make long double primitive in Qt 6 on Darwin
I don't know the historical reasons for that, but C++11 mandates long double as a type. On Darwin this means that long double was a complex type, so the best for now is to mark it relocatable. Change-Id: Ic933947a282ad963d5d0168c2768cc98fdd456bc Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
dbfde461ed
commit
56723c6e91
@ -304,14 +304,11 @@ Q_DECLARE_TYPEINFO(qint64, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(quint64, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(float, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(double, Q_PRIMITIVE_TYPE);
|
||||
#ifndef Q_OS_DARWIN
|
||||
Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE);
|
||||
#endif
|
||||
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
// ### Qt 6: remove the other branch
|
||||
// This was required so that QList<T> for these types allocates out of the array storage
|
||||
Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE);
|
||||
# ifdef Q_COMPILER_UNICODE_STRINGS
|
||||
Q_DECLARE_TYPEINFO(char16_t, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(char32_t, Q_PRIMITIVE_TYPE);
|
||||
@ -320,6 +317,11 @@ Q_DECLARE_TYPEINFO(char32_t, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(wchar_t, Q_PRIMITIVE_TYPE);
|
||||
# endif
|
||||
#else
|
||||
# ifndef Q_OS_DARWIN
|
||||
Q_DECLARE_TYPEINFO(long double, Q_PRIMITIVE_TYPE);
|
||||
# else
|
||||
Q_DECLARE_TYPEINFO(long double, Q_RELOCATABLE_TYPE);
|
||||
# endif
|
||||
# ifdef Q_COMPILER_UNICODE_STRINGS
|
||||
Q_DECLARE_TYPEINFO(char16_t, Q_RELOCATABLE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(char32_t, Q_RELOCATABLE_TYPE);
|
||||
|
Loading…
Reference in New Issue
Block a user