qt5base-lts/tests/auto/corelib
Bradley T. Hughes a219b8f382 Fix QString and QByteArray reserve() and squeeze()
These functions should not take care not to unconditionally set the
capacityReserved private member, since the d may be referencing the
const shared_null or shared_empty which live in read-only memory.

The squeeze() methods check for ref > 1 instead of ref != 1 to prevent
detaching from the shared_null/shared_empty unnecessarily; the
shared_null/shared_empty ref count is -1, meaning squeeze() will never
detach from it.

Change-Id: Id3f1725a6f08b3a462343640a47bbe78f08ca7e7
Rubberstamped-by: Lars Knoll
Reviewed-on: http://codereview.qt-project.org/5454
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-23 13:42:22 +02:00
..
animation Moving Tests to new Autotest Structure 2011-08-24 10:09:19 +02:00
codecs Moving relevant tests to corelib/codecs 2011-08-26 08:49:59 +02:00
concurrent Wrap calls to Sequence::push_back 2011-09-17 03:21:15 +02:00
global Merge branch 'master' into refactor 2011-09-12 07:49:03 +02:00
io This test passes fine. 2011-09-20 19:18:19 +02:00
kernel Move handling of -qmljsdebugger argument to QCoreApplication 2011-09-19 16:37:51 +02:00
plugin Disabled tests for refactor->master integration 2011-09-13 08:25:05 +02:00
statemachine Moving relevant tests to corelib/statemachine 2011-09-01 12:54:42 +02:00
thread Moving relevant tests to corelib/thread 2011-09-01 12:54:58 +02:00
tools Fix QString and QByteArray reserve() and squeeze() 2011-09-23 13:42:22 +02:00
xml Moving relevant tests to corelib/xml 2011-09-01 13:08:32 +02:00
corelib.pro Moving relevant tests to corelib/xml 2011-09-01 13:08:32 +02:00