diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-10-10 18:58:22 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-12-03 17:57:09 +0000 |
commit | 7f4d0405b409b1d3aa9d91e31972669576ec698c (patch) | |
tree | 62dbdef41552dc1873e7a15ae8e2e1d48b63d0a0 /src/corelib/doc/snippets | |
parent | 972f8845a85d6a07140025e4257cb8a1a2699b5d (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/doc/snippets')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QString> list; list << "A" << "B" << "C" << "D" << "E" << "F"; -list.swap(1, 4); +list.swapItemsAt(1, 4); // list: ["A", "E", "C", "D", "B", "F"] //! [12] |