qt5base-lts/tests/auto/corelib/tools/qarraydata
Andrei Golubev e35d0ae0cc Support GrowsBackwards flag in QArrayDataPointer
Introduced allocation function in QArrayDataPointer with
interface similar to QArrayData::allocate that supports growing
strategies. This func is used instead of the original in cases
when prepend-aware storage is needed. Tried to follow Qt5 QList
policy in terms of space reservation

Updated QPodArrayOps::reallocate to be aware of growing
shenanigans. It doesn't look like a perfect solution but it is
rather close and similar to what Qt6 QList is doing when not
growing (e.g. reserve/squeeze)

Added initial QCommonArrayOps with helper function that tells
when reallocation is preferable over just using the insert-like
operation. This comes up later on when GrowsBackwards policy is
properly supported in operations

Essentially, 2/3 main data management blocks for prepend optimization
are introduced here. The last one being a generalized data move that
is done instead of reallocation when existing free space is not enough

Task-number: QTBUG-84320
Change-Id: I9a2bac62ad600613a6d7c5348325e0e54aadb73d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-27 18:58:20 +02:00
..
CMakeLists.txt Separate exception safety primitives from operations 2020-08-18 12:55:38 +02:00
qarraydata.pro Separate exception safety primitives from operations 2020-08-18 12:55:38 +02:00
simplevector.h Support GrowsBackwards flag in QArrayDataPointer 2020-08-27 18:58:20 +02:00
tst_qarraydata.cpp Support GrowsBackwards flag in QArrayDataPointer 2020-08-27 18:58:20 +02:00