diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-11-04 11:12:05 +0100 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2020-11-09 17:36:04 +0100 |
commit | 2768270573c2707add47aebbfbbadaecaf828eec (patch) | |
tree | 92ac070bc26e3c343a3f3c51f7ff2676552053ae /src/corelib/doc | |
parent | f43828687581c2d89549225d1cdc7518bde43b65 (diff) |
Do not shrink on remove()
This is in line with Qt 5 behavior, how std::vector works and also
how QString and QByteArray behave. If you need the shrink allocated
storage, call squeeze() manually.
Change-Id: I16cadd4f2a89bb2ec5de02fe69186f5da321cd06
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r-- | src/corelib/doc/src/qt6-changes.qdoc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/doc/src/qt6-changes.qdoc b/src/corelib/doc/src/qt6-changes.qdoc index 4dd7488e1b..b92144a699 100644 --- a/src/corelib/doc/src/qt6-changes.qdoc +++ b/src/corelib/doc/src/qt6-changes.qdoc @@ -161,10 +161,9 @@ \section3 Stability of References There are several changes made to the QVector/QList implementation. The - QVector related ones are: insertion at the beginning is optimized (similarly - to QList in Qt 5) and element removal can reallocate in order to remove the - unused capacity. The QList related one is: memory layout for the elements is - simplified. + QVector related one is: insertion at the beginning is optimized (similarly + to QList in Qt 5). The QList related one is: memory layout for the elements + is simplified. \important These changes impact the stability of references. In Qt 6, you should consider any size or capacity modifying method to invalidate all |