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

Namely compare() and operator==().

Change-Id: I7e404f2f1df5b93614f7e266bdbebe909e4e7623
Fixes: QTBUG-54505
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5d0b338f4dec7bf457605a87330917818525d4b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ahmad Samir 2023-01-17 17:24:46 +02:00 committed by Qt Cherry-pick Bot
parent 6de07b38df
commit 8b0f8ab96a

View File

@ -3914,6 +3914,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}
*/
@ -6287,6 +6289,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}
*/