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/doc/snippets/code/src_corelib_tools_qlistdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/doc') diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp index cc3f689710..0e746cd6e6 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp @@ -146,7 +146,7 @@ list.move(1, 4); //! [12] QList list; list << "A" << "B" << "C" << "D" << "E" << "F"; -list.swap(1, 4); +list.swapItemsAt(1, 4); // list: ["A", "E", "C", "D", "B", "F"] //! [12] -- cgit v1.2.3