From 441a4ac1bccf8cb8278e3f76f6922611459ee58c Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 14 Apr 2025 14:51:14 +0800 Subject: [PATCH] Doc: link to "Which string class to use?" on all string pages This section has very useful flowcharts. The question "Which string class to use?" is exactly what most users will want the answer to when faced with all of the different string types we provide. Task-number: QTBUG-135947 Change-Id: I2ae79803e205693d6c7ee8f50cad5d057c4d24ea Reviewed-by: Edward Welbourne --- src/corelib/text/qanystringview.cpp | 2 +- src/corelib/text/qstring.cpp | 3 ++- src/corelib/text/qstringview.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/text/qanystringview.cpp b/src/corelib/text/qanystringview.cpp index da72e5f18d4..c8e5daaf089 100644 --- a/src/corelib/text/qanystringview.cpp +++ b/src/corelib/text/qanystringview.cpp @@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE and UTF-8 multibyte sequences count as two, three or four, depending on their length). - \sa QUtf8StringView, QStringView + \sa {Which string class to use?}, QUtf8StringView, QStringView */ /*! diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index ff68f9509e4..b2f4919c7c4 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -2132,7 +2132,8 @@ void qtWarnAboutInvalidRegularExpression(const QString &pattern, const char *whe Mitigating or controlling the behavior these limits cause is beyond the scope of the Qt API. - \sa fromRawData(), QChar, QStringView, QLatin1StringView, QByteArray + \sa {Which string class to use?}, fromRawData(), QChar, QStringView, + QLatin1StringView, QByteArray */ /*! \typedef QString::ConstIterator diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp index b3ac645ceda..0b7fbca0a44 100644 --- a/src/corelib/text/qstringview.cpp +++ b/src/corelib/text/qstringview.cpp @@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE allowed in \c constexpr functions). You can use an indexed loop and/or utf16() in \c constexpr contexts instead. - \sa QString + \sa {Which string class to use?}, QString */ /*!