qt5base-lts/tests/auto/corelib/tools/qarraydata
João Abecasis 8c413f3eff Introduce QArrayData::detachCapacity
This follows QArrayData::detachFlags's lead. Given the (known) size for
a detached container, the function helps determine capacity, ensuring
the capacityReserved flag is respected.

This further helps aggregating behaviour on detach in QArrayData itself.

SimpleVector was previously using qMax(capacity(), newSize), but there's
no reason to pin the previous capacity value if reserve() wasn't
requested. It now uses detachCapacity().

Change-Id: Ide2d99ea7ecd2cd98ae4c1aa397b4475d09c8485
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-02 16:34:21 +02:00
..
qarraydata.pro SimpleVector as a test case for QArrayData 2011-12-07 02:01:42 +01:00
simplevector.h Introduce QArrayData::detachCapacity 2012-04-02 16:34:21 +02:00
tst_qarraydata.cpp Introduce QArrayData::detachCapacity 2012-04-02 16:34:21 +02:00