From c9424fa6687b5d83227c8c07df1e3806b8f487b5 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Sat, 17 Nov 2012 18:56:16 +0100 Subject: QString doesn't work with old ABI on ARM. QString doesn't work on ARM platform with old ABI because QChar has wrong size. Macro Q_PACKED was removed by commit 1ec8acd77b6c048f5a68887ac7750b0764ade598. Some projects still use old ABI. It is better to check version of ABI during compiling. Task-number: QTBUG-15784 Change-Id: I92180b864679e01363fa837260707b67674d0a26 Reviewed-by: Thiago Macieira --- src/corelib/tools/qchar.h | 6 +++++- src/corelib/tools/qlocale.h | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index 953f3a048c..cfa1ccc07b 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -360,7 +360,11 @@ private: QChar(uchar c); #endif ushort ucs; -}; +} +#if (defined(__arm__) && defined(QT_NO_ARM_EABI)) + Q_PACKED +#endif +; Q_DECLARE_TYPEINFO(QChar, Q_MOVABLE_TYPE); diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h index 620223668a..b19d847a17 100644 --- a/src/corelib/tools/qlocale.h +++ b/src/corelib/tools/qlocale.h @@ -786,7 +786,12 @@ public: struct Data { quint16 index; quint16 numberOptions; - }; + } +#if (defined(__arm__) || defined(QT_NO_ARM_EABI)) + Q_PACKED +#endif + ; + private: friend struct QLocalePrivate; // ### We now use this field to pack an index into locale_data and NumberOptions. -- cgit v1.2.3