diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-04-08 21:25:42 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-04-12 11:32:18 +0000 |
commit | 9dff809b452b0b69f5583cd0c131c65991631200 (patch) | |
tree | 39dbc2b9bbaba0b89f7d83e40ea4efeae7247e40 /src/corelib/tools/qbytearray.cpp | |
parent | 58a4f41af2b27957bc9dac89df21051620e3d2ec (diff) |
Array-backed containers: add shrink_to_fit for STL compatibility
Side note: QHash has squeeze(), but there's no shrink_to_fit on
std::unordered_map.
[ChangeLog][QtCore][QByteArray] Added shrink_to_fit().
[ChangeLog][QtCore][QString] Added shrink_to_fit().
[ChangeLog][QtCore][QVarLengthArray] Added shrink_to_fit().
[ChangeLog][QtCore][QVector] Added shrink_to_fit().
Change-Id: Ifd7d28c9bed70727be6308f0191a188201784f61
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 6be28fea5f..c728a05f55 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1134,6 +1134,13 @@ static inline char qToLower(char c) Same as prepend(\a ch). */ +/*! \fn void QByteArray::shrink_to_fit() + \since 5.10 + + This function is provided for STL compatibility. It is equivalent to + squeeze(). +*/ + /*! \fn QByteArray::QByteArray(const QByteArray &other) Constructs a copy of \a other. |