diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2024-08-27 09:08:21 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2024-08-28 21:21:12 +0200 |
| commit | c1fc85df109a4dff57d7615a353bfcc7e172b0c9 (patch) | |
| tree | 84f9dd977082012d2a212817a321151621ace6be /src/corelib/text/qstringtokenizer.cpp | |
| parent | 799e16149ce9d34419da9ea35f790412202ce7a8 (diff) | |
QStringTokenizer: update docs for a world in which C++17 is required
Remove mentions of pre-C++17 behavior.
Don't recommend against qTokenize() any longer (it's shorter than
"QStringTokenizer") and mention it in the QStringTokenizer class
documentation, too.
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: I8cf3310fc9de80db0a89aecfdf695a49d390da47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringtokenizer.cpp')
| -rw-r--r-- | src/corelib/text/qstringtokenizer.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/corelib/text/qstringtokenizer.cpp b/src/corelib/text/qstringtokenizer.cpp index fc6faed27f4..79b355ceff2 100644 --- a/src/corelib/text/qstringtokenizer.cpp +++ b/src/corelib/text/qstringtokenizer.cpp @@ -24,8 +24,8 @@ QT_BEGIN_NAMESPACE enumerations Qt::SplitBehavior and Qt::CaseSensitivity further control the output. - QStringTokenizer drives QStringView::tokenize(), but, at least with a - recent compiler, you can use it directly, too: + QStringTokenizer drives QStringView::tokenize(), but you can use it + directly, too: \code for (auto it : QStringTokenizer{string, separator}) @@ -33,10 +33,9 @@ QT_BEGIN_NAMESPACE \endcode \note You should never, ever, name the template arguments of a - QStringTokenizer explicitly. If you can use C++17 Class Template - Argument Deduction (CTAD), you may write + QStringTokenizer explicitly. You may write \c{QStringTokenizer{string, separator}} (without template - arguments). If you can't use C++17 CTAD, you must use the + arguments), or use the qTokenize() function, or the QStringView::split() or QLatin1StringView::split() member functions and store the return value only in \c{auto} variables: @@ -320,10 +319,6 @@ QT_BEGIN_NAMESPACE Pass values from Qt::CaseSensitivity and Qt::SplitBehavior enumerators as \a flags to modify the behavior of the tokenizer. - - You can use this function if your compiler doesn't, yet, support C++17 Class - Template Argument Deduction (CTAD). We recommend direct use of QStringTokenizer - with CTAD instead. */ QT_END_NAMESPACE |
