diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2012-02-17 14:18:45 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-22 09:34:26 +0100 |
commit | a5233b6b22e20bf249d8ae993a4224c6874abccf (patch) | |
tree | ea01a334d605138417d2bbb3453f619f73803bce /tests/auto | |
parent | 3fe1eed0537c3b08a51295b544e0620ade1eca22 (diff) |
Change meaning of offset in QStringData
It used to be an index into the first element in 'd' that came after
'offset'. It is now the byte offset from the beginning of the
QStringData structure.
By no longer using an actual array to access characters, we also steer
clear of GCC bug #43247:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
This aligns this data structure with QArrayData. The intention is to
have QVector, QString and QByteArray share the same memory layout and
possibly code.
Change-Id: I4850813e1bd47c3cb670c50c9a8ccc1bff2e8597
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/tools/qstring/tst_qstring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index e3808244d3..ba583f3cb8 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -5150,7 +5150,7 @@ void tst_QString::literals() QVERIFY(str.length() == 4); QVERIFY(str == QLatin1String("abcd")); QVERIFY(str.data_ptr()->ref.isStatic()); - QVERIFY(str.data_ptr()->offset == 0); + QVERIFY(str.data_ptr()->offset == sizeof(QStringData)); const QChar *s = str.constData(); QString str2 = str; |