diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2013-10-08 13:17:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-26 00:21:22 +0100 |
commit | 84c10500b1730e8d947732728d190fde612fc840 (patch) | |
tree | 6378b7246b6c25ca93e1e64c05650a3e6c81db16 /src/corelib/tools/qvector.cpp | |
parent | 9157a1f97a47fd63d1e58c560d30c25f97674ae8 (diff) |
QVector: add removeOne(), removeAll() for QList compatibility
Eases migration from QList to QVector.
[ChangeLog][QtCore][QVector] Added removeOne(), removeAll() for
QList compatibility.
Change-Id: I4211afb2e077c187d0a39f0ac4528f0c66721fb3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qvector.cpp')
-rw-r--r-- | src/corelib/tools/qvector.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp index 89396540e0..b2b4315545 100644 --- a/src/corelib/tools/qvector.cpp +++ b/src/corelib/tools/qvector.cpp @@ -576,6 +576,28 @@ \sa remove(), QList::removeAt() */ +/*! \fn int QVector::removeAll(const T &t) + \since 5.4 + + Removes all elements that compare equal to \a t from the + vector. Returns the number of elements removed, if any. + + Provided for compatibility with QList. + + \sa removeOne(), QList::removeAll() +*/ + +/*! \fn bool QVector::removeOne(const T &t) + \since 5.4 + + Removes the first element that compares equal to \a t from the + vector. Returns whether an element was, in fact, removed. + + Provided for compatibility with QList. + + \sa removeAll(), QList::removeOne() +*/ + /*! \fn int QVector::length() const \since 5.2 |