Don't manipulate immutable data
authorJoão Abecasis <joao.abecasis@nokia.com>
Fri, 24 Aug 2012 08:53:58 +0000 (10:53 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 11 Sep 2012 21:54:57 +0000 (23:54 +0200)
commit975ebdc4ab77d1c0d8bc91e393eca7095a5d8742
tree424f05539ece68cd28256e100527bb5eaf54fa57
parentf3707a5a0c4483b15e7bb2ba9f0e7d1913a713ee
Don't manipulate immutable data

QArrayData can point to data it does not own (cf. fromRawData()), which
shouldn't be modified. Not even upon destruction, as this data can live
in Read-Only memory or be otherwise shared outside the QArrayData realm.

Change-Id: I8bdf3050a17802fb003b77d5f543fe31769a7710
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com>
src/corelib/tools/qarraydatapointer.h
tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp