diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2022-11-18 15:22:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-11-30 13:49:09 +0000 |
commit | afc4df5222b2fd0915896ab40afbe3a6d279949b (patch) | |
tree | f41e2cdef064848311ce2b531aaeb26cb31c0748 /src | |
parent | e97cc54f70094f8679ce3250b5019a3b295f1e27 (diff) | |
download | qtbase-afc4df5222b2fd0915896ab40afbe3a6d279949b.tar.gz |
QStringView::split: doc tidies
QStringView is a borrowed range, so views into it are always valid,
even if the QStringView itself is destroyed. Clarify the comment.
Fix another typo (referring to the view as "string") as well.
Change-Id: I8a4f45494d44d5a47e3c1f764f12c899ad7ee83d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 3ccd1d2d835a623acff2b6ac52f8b1d5ec9ce108)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/text/qstring.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index d913cc3495..1b839c901a 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -7694,14 +7694,15 @@ QStringList QString::split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensit \fn QList<QStringView> QStringView::split(QStringView sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const - Splits the string into substring views wherever \a sep occurs, and + Splits the view into substring views wherever \a sep occurs, and returns the list of those string views. See QString::split() for how \a sep, \a behavior and \a cs interact to form the result. - \note All views are valid as long as this string is. Destroying this - string will cause all views to be dangling pointers. + \note All the returned views are valid as long as the data referenced by + this string view is valid. Destroying the data will cause all views to + become dangling. \since 6.0 */ |