From ceaf5b9a2bda931c13907f2fa75d1ceff73b4beb Mon Sep 17 00:00:00 2001 From: Jaishree Vyas Date: Thu, 18 Jul 2024 12:29:22 +0200 Subject: [PATCH] Doc: Documentation for QList classes should mention how to sort them Added a statement in the QList descriton and linked it to the Qt containers and std algorithms Fixes: QTBUG-94993 Change-Id: I12b75d147cb6e80036133547cc6365b3325c7e28 Reviewed-by: Ivan Solovev (cherry picked from commit 4f66c10ba2f6234b7d404e7617b86eff567d657b) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qlist.qdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index e07b74cd53c..0a1d287bfa9 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -130,6 +130,9 @@ per-function basis. For iterating over the items, see \l {Iterating over Containers}. + For using QList with functions from \c {} header, such as + \c {std::sort()}, \c {std::reverse()}, and \c {std::count_if()}, + see \l {Qt containers and std algorithms}. In addition to QList, Qt also provides QVarLengthArray, a very low-level class with little functionality that is optimized for