summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-10-05 03:48:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 18:47:27 +0200
commit059857d4d5dc5862d0135c839e7dabaa7331e4b5 (patch)
treef7452bccc8493d88927ed5cc56d49ce7138436b7 /src/corelib/tools/qvector.cpp
parent0e96e47debd1d8c48d1d23fd51c9ee05f61c80e0 (diff)
QVector: add some functions missing for QList compat
Eases migration from QList to QVector. Had to rename the 'length' parameter to mid() to suppress -Wshadow warnings. Task-number: QTBUG-3781 Change-Id: I755c6caefe4de81ea42a81b1c76aab728e639613 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/tools/qvector.cpp')
-rw-r--r--src/corelib/tools/qvector.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 69b656c191..11990d30b2 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -562,6 +562,44 @@
\sa insert(), replace(), fill()
*/
+/*! \fn void QVector::removeAt(int i)
+ \since 5.2
+
+ Equivalent to
+ \code
+ remove(i);
+ \endcode
+
+ Provided for compatibility with QList.
+
+ \sa remove(int), QList::removeAt(int)
+*/
+
+/*! \fn int QVector::length() const
+ \since 5.2
+
+ Same as size() and count().
+
+ Provided for compatibility with QList.
+
+ \sa size(), count(), QList::length()
+*/
+
+/*! \fn T QVector::takeAt(int i)
+ \since 5.2
+
+ Equivalent to
+ \code
+ T t = at(i);
+ remove(i);
+ return t;
+ \endcode
+
+ Provided for compatibility with QList.
+
+ \sa takeFirst(), takeLast(), QList::takeAt(int)
+*/
+
/*! \fn void QVector::removeFirst()
\since 5.1
Removes the first item in the vector. Calling this function is