summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qcollator.cpp
diff options
context:
space:
mode:
authorJaishree Vyas <jaishree.vyas@qt.io>2023-10-04 14:55:37 +0200
committerIvan Solovev <ivan.solovev@qt.io>2023-11-20 16:46:15 +0000
commit19b17667da951799506abbb9cc7dc29c724b22c1 (patch)
tree9f7b43af15bc46e7a2731b7db6dc18cc31e9e977 /src/corelib/text/qcollator.cpp
parentd462c7b09c07b366ee5cea00116e32a4b7fedac6 (diff)
Improve the documentation of compare() overloads for string-like types
Also update the QCollator::compare() docs for consistency. Task-number: QTBUG-114822 Change-Id: I5fca896cacedd93ce5a4a1a8aead1986a21f6993 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/text/qcollator.cpp')
-rw-r--r--src/corelib/text/qcollator.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/text/qcollator.cpp b/src/corelib/text/qcollator.cpp
index 3e17f8cc2d..2b49b8178b 100644
--- a/src/corelib/text/qcollator.cpp
+++ b/src/corelib/text/qcollator.cpp
@@ -317,8 +317,8 @@ bool QCollator::ignorePunctuation() const
Compares \a s1 with \a s2.
- Returns an integer less than, equal to, or greater than zero depending on
- whether \a s1 sorts before, with or after \a s2.
+ Returns a negative integer if \a s1 is less than \a s2, a positive integer
+ if it is greater than \a s2, and zero if they are equal.
*/
/*!
@@ -341,8 +341,9 @@ bool QCollator::ignorePunctuation() const
Compares \a s1 with \a s2. \a len1 and \a len2 specify the lengths of the
QChar arrays pointed to by \a s1 and \a s2.
- Returns an integer less than, equal to, or greater than zero depending on
- whether \a s1 sorts before, with or after \a s2.
+ Returns a negative integer if \a s1 is less than \a s2, a positive integer
+ if it is greater than \a s2, and zero if they are equal.
+
\note In Qt versions prior to 6.4, the length arguments were of type
\c{int}, not \c{qsizetype}.