diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-06-19 17:31:00 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-08 18:19:50 +0100 |
commit | 746ab4bbd6ebf2147ce93390738c8a71d6a4a335 (patch) | |
tree | 7e336ac6bb2c84323867cf7efb02a8ec9243c032 /tests/auto/other | |
parent | b42a2b3c3338a320a438bc081cb885fd4547f01f (diff) |
Inline the size and data pointer members in QString
I'd have preferred to use QArrayDataPointer<ushort> for QString, but
that option wasn't the best one. QArrayDataPointer try to do some
operations using QArrayDataOps and that would expand to unnecessary
code. What's more, the existing code expected to be able to modify and
access the d pointer.
Instead, this commit introduces QStringPrivate (named differently from
QStringData to catch potential users), which contains the three
members. This POD class is also used in QJsonValue to store the
"inlined" QString. QHashedString in qtdeclarative will need a similar
solution.
Change-Id: I33f072158e6e2cd031d4d2ffc81f4a8dbaf4e616
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r-- | tests/auto/other/toolsupport/tst_toolsupport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp index 2440b4a5e9..9591eca16a 100644 --- a/tests/auto/other/toolsupport/tst_toolsupport.cpp +++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp @@ -126,9 +126,9 @@ void tst_toolsupport::offsets_data() #ifdef Q_PROCESSOR_X86 // x86 32-bit has weird alignment rules. Refer to QtPrivate::AlignOf in // qglobal.h for more details. - data << 176 << 272; + data << 184 << 288; #else - data << 180 << 272; + data << 188 << 288; #endif } #endif |