From 5d0b338f4dec7bf457605a87330917818525d4b2 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 17 Jan 2023 17:24:46 +0200 Subject: [PATCH] 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 --- src/corelib/text/qstring.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 9259d485c1..e2eb27a4d4 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -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} */