summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.qdoc
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-10-10 08:51:04 +0200
committerLars Knoll <lars.knoll@qt.io>2019-05-07 14:15:37 +0000
commitd510e1e7f919e01a3b875ff5a575b818e5ee03e8 (patch)
tree7ce9828d3e7f2867477736f2609762fb2977a56c /src/corelib/tools/qvector.qdoc
parent587bdd144b7e574e57f17167808774fa9783ee78 (diff)
Add swapItemsAt() to QVector
This closes one compatibility gap with QList, to make it easier to replace QList with QVector in Qt6. Change-Id: I5655bc4cd2150a6f09a1ed68c0742f3b42ca47e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/tools/qvector.qdoc')
-rw-r--r--src/corelib/tools/qvector.qdoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.qdoc b/src/corelib/tools/qvector.qdoc
index cb47d36356..c1b5054f93 100644
--- a/src/corelib/tools/qvector.qdoc
+++ b/src/corelib/tools/qvector.qdoc
@@ -288,6 +288,16 @@
never fails.
*/
+/*! \fn template <typename T> void QVector<T>::swapItemsAt(int i, int j)
+ \since 5.14
+
+ Exchange the item at index position \a i with the item at index
+ position \a j. This function assumes that both \a i and \a j are
+ at least 0 but less than size(). To avoid failure, test that both
+ \a i and \a j are at least 0 and less than size().
+*/
+
+
/*! \fn template <typename T> bool QVector<T>::operator==(const QVector<T> &other) const
Returns \c true if \a other is equal to this vector; otherwise