diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-02-21 16:03:34 +0000 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-02-22 20:39:06 +0000 |
commit | 56723c6e913498b96c0c814611c46bfcbd262e67 (patch) | |
tree | 06e3c2615238689615562a36b2804d93991ed8e9 /src/corelib/global | |
parent | dbfde461ed9cb68ee23b6b15c3fadf66f6651205 (diff) |
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>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 53f6b3fff6..d197c8d384 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -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); |