diff options
Diffstat (limited to 'src/corelib/text/qstring.cpp')
-rw-r--r-- | src/corelib/text/qstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 3e6188a38d..ebdb571041 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -2516,7 +2516,7 @@ void QString::reallocData(qsizetype alloc, Data::ArrayOptions allocOptions) dd.data()[dd.size] = 0; d = dd; } else { - d->reallocate(alloc); + d->reallocate(alloc, allocOptions & (QArrayData::GrowsBackwards|QArrayData::GrowsForward) ? QArrayData::Grow : QArrayData::KeepSize); } } @@ -2531,7 +2531,7 @@ void QString::reallocGrowData(qsizetype n) dd.data()[dd.size] = 0; d = dd; } else { - d->reallocate(d.constAllocatedCapacity() + n); + d->reallocate(d.constAllocatedCapacity() + n, QArrayData::Grow); } } |