From 19085350fb3b9de89a4c3e5a6c1c7bbb2a43c324 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 20 Feb 2017 10:07:29 +0100 Subject: 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 --- src/corelib/tools/qlist.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/tools/qlist.h') 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::isStatic || QTypeInfo::isLarge, QListData::IndirectLayout, typename std::conditional< -- cgit v1.2.3