diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-02-20 10:07:29 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-02-22 08:04:12 +0000 |
commit | 19085350fb3b9de89a4c3e5a6c1c7bbb2a43c324 (patch) | |
tree | 6a23805fed9ead17b7a12b07794834edcfe90cdb /src/corelib/tools/qlist.h | |
parent | 4df229ce50d72e814c34b73c14a30c4d3d4724b1 (diff) |
Do not use QTypeInfo::isStatic anymore
... except in QList.
When dafa3618 introduced isRelocatable and QTypeInfoQuery, the
intention was to decouple the memory layout of QList from the
reallocation optimizations in QVector. This never happened, as
QVector (and QVarLengthArray) continue to use isStatic to this
day.
Fix by porting both QVector and QVLA to QTypeInfoQuery and
isRelocatable.
Change-Id: I6951f2cf21f0cbb24e2dbd38f80f1bd82007d394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r-- | src/corelib/tools/qlist.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index c0a92aaa10..f861c1e71c 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -126,6 +126,7 @@ class QList public: struct MemoryLayout : std::conditional< + // must stay isStatic until ### Qt 6 for BC reasons (don't use !isRelocatable)! QTypeInfo<T>::isStatic || QTypeInfo<T>::isLarge, QListData::IndirectLayout, typename std::conditional< |