summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-10-10 18:58:22 +0200
committerLars Knoll <lars.knoll@qt.io>2018-12-03 17:57:09 +0000
commit7f4d0405b409b1d3aa9d91e31972669576ec698c (patch)
tree62dbdef41552dc1873e7a15ae8e2e1d48b63d0a0 /src/corelib/tools/qlist.cpp
parent972f8845a85d6a07140025e4257cb8a1a2699b5d (diff)
Rename QList<T>::swap(int, int) to swapItemsAt()
The old name was confusing as it conflicted with QList<T>::swap(QList &other), that was doing something completely different. Rename the method to swapItemsAt() which is a lot clearer. Change-Id: Iac77a1e790a7256766f83a24d2a243c880d875f4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src/corelib/tools/qlist.cpp')
-rw-r--r--src/corelib/tools/qlist.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 0eed4a619e..1de93ff9e1 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -965,6 +965,13 @@ void **QListData::erase(void **xi)
/*! \fn template <class T> void QList<T>::swap(int i, int j)
+ \obsolete Use swapItemsAt()
+
+ \sa move(), swapItemsAt()
+*/
+
+/*! \fn template <class T> void QList<T>::swapItemsAt(int i, int j)
+
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