From 7f4d0405b409b1d3aa9d91e31972669576ec698c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 10 Oct 2018 18:58:22 +0200 Subject: Rename QList::swap(int, int) to swapItemsAt() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old name was confusing as it conflicted with QList::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 --- src/corelib/tools/qlist.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/corelib/tools/qlist.cpp') 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 void QList::swap(int i, int j) + \obsolete Use swapItemsAt() + + \sa move(), swapItemsAt() +*/ + +/*! \fn template void QList::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 -- cgit v1.2.3