QString: add note about isNull() vs. isEmpty() to more methods

Namely compare() and operator==().

Change-Id: I7e404f2f1df5b93614f7e266bdbebe909e4e7623
Fixes: QTBUG-54505
Pick-to: 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Ahmad Samir 2023-01-17 17:24:46 +02:00
parent 16bf899557
commit 5d0b338f4d
1 changed files with 7 additions and 0 deletions

View File

@ -3907,6 +3907,8 @@ QString &QString::replace(QChar c, QLatin1StringView after, Qt::CaseSensitivity
Returns \c true if string \a s1 is equal to string \a s2; otherwise
returns \c false.
\include qstring.cpp compare-isNull-vs-isEmpty
\sa {Comparing Strings}
*/
@ -6295,6 +6297,11 @@ QString& QString::fill(QChar ch, qsizetype size)
\snippet qstring/main.cpp 16
//! [compare-isNull-vs-isEmpty]
\note This function treats null strings the same as empty strings,
for more details see \l {Distinction Between Null and Empty Strings}.
//! [compare-isNull-vs-isEmpty]
\sa operator==(), operator<(), operator>(), {Comparing Strings}
*/