diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h index 5f43ed3dc0d..cf054a089fd 100644 --- a/src/corelib/tools/qarraydataops.h +++ b/src/corelib/tools/qarraydataops.h @@ -397,8 +397,8 @@ public: T *begin; qsizetype size; - qsizetype sourceCopyConstruct, nSource, move, sourceCopyAssign; - T *end, *last, *where; + qsizetype sourceCopyConstruct = 0, nSource = 0, move = 0, sourceCopyAssign = 0; + T *end = nullptr, *last = nullptr, *where = nullptr; Inserter(QArrayDataPointer *d, QArrayData::GrowthPosition pos) : data(d), increment(pos == QArrayData::GrowsAtBeginning ? -1 : 1) @@ -414,6 +414,7 @@ public: data->ptr = begin; data->size = size; } + Q_DISABLE_COPY(Inserter) void setup(qsizetype pos, qsizetype n) {