Details
-
Suggestion
-
Resolution: Fixed
-
Not Evaluated
-
5.15.2, 6.1.2
-
None
-
-
8
-
4f66c10ba (dev), ceaf5b9a2 (6.8)
-
Foundation Sprint 111, Foundation Sprint 112, Foundation Sprint 113
Description
Documentation for QVector, QList and probably other containers do not even mention how to sort them. Open in a browser > Find on a page > type in "sort" > Phase not found, 0 matches.
Few minutes later, I found through web search engine (and also folks pointed out in chat) that I should use std::stable_sort and other STL/std::methods. For people coming from non C++ background (hello, rust) it may not be obvious. In such situation they ain't gonna be looking "STL" nor "iterators", they expect to find some }}{{sort() method, or at least a reference to it. Unfortunately, STL-iterator is not formally an interface, it can not be "implemented" by a class, so no members could be shown through inheritance list.
A brief enumeration of such common operations on a container, including filtering and mapping would certainly help newcomers find the info they need.
Attachments
For Gerrit Dashboard: QTBUG-94993 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
577323,4 | Doc: Documentation for QList classes should mention how to sort them | dev | qt/qtbase | Status: MERGED | +2 | 0 |
579054,2 | Doc: Documentation for QList classes should mention how to sort them | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |