Go to file
João Abecasis 2ac4c463af Make QByteArray and QString keep track of terminating null
In conceptual terms, this change increments the Data::alloc member by
one for all strings allocated and maintained by these classes. Instances
initialized with fromRawData retain 0 as the member value, so they are
treated as immutable.

This brings QByteArray and QString closer to QVector, making it possible
for them to reference and share the same data in memory, in the future.
It also brings them closer to QArrayData.

In practical terms all comparisons to the alloc member were changed to
take into account that it also tracks the terminating null character.

Aside from the increment in the alloc member, there should be no user
visible changes.

Change-Id: I618f49022a9b1845754500c8f8706c72a68b9c7d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-16 15:50:53 +02:00
bin Fix qtmodule-configtests to honor error codes 2012-03-08 23:52:34 +01:00
config.tests Merge remote-tracking branch 'origin/master' into api_changes 2012-04-10 15:31:45 +02:00
dist Finish cleaning up com.trolltech -> org.qtproject in QtDBus 2012-04-16 00:07:39 +02:00
doc/src QHash security fix (1.5/2): qHash two arguments overload support 2012-04-04 13:02:58 +02:00
examples Merge remote-tracking branch 'origin/master' into api_changes 2012-04-10 15:31:45 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Make plugin linking fail if some references aren't present 2012-04-10 18:22:51 +02:00
qmake Merge remote-tracking branch 'origin/master' into api_changes 2012-04-10 15:31:45 +02:00
src Make QByteArray and QString keep track of terminating null 2012-04-16 15:50:53 +02:00
tests Show the type and address of QObjects in debug output. 2012-04-16 11:35:44 +02:00
tools Merge remote-tracking branch 'origin/master' into api_changes 2012-04-10 15:31:45 +02:00
util Stop relying on qHash always giving the same results 2012-04-08 21:44:26 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore device: Add -device and -device-option to configure 2012-03-27 05:35:57 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure Merge remote-tracking branch 'origin/master' into api_changes 2012-04-10 15:31:45 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro device: Add -device and -device-option to configure 2012-03-27 05:35:57 +02:00
sync.profile Add qprocessordetection.h 2012-02-08 12:33:11 +01:00