summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/qt6-changes.qdoc
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-10-27 09:24:43 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-10-27 12:49:40 +0100
commitd5050dcec47c38c4ac3a9022744b252b6b5b1212 (patch)
tree6587fd08e9cfeeda859187d833e441af3b62ceb4 /src/corelib/doc/src/qt6-changes.qdoc
parent626a9b66f2b9f8a7e3977bee32afa64778b6b8f2 (diff)
Fix copy and past error, add minor doc update
Change-Id: I50d58086bf20d96993ab7c5e4790f07bbfdb8089 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/doc/src/qt6-changes.qdoc')
-rw-r--r--src/corelib/doc/src/qt6-changes.qdoc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/doc/src/qt6-changes.qdoc b/src/corelib/doc/src/qt6-changes.qdoc
index 69208a2628..a047460b10 100644
--- a/src/corelib/doc/src/qt6-changes.qdoc
+++ b/src/corelib/doc/src/qt6-changes.qdoc
@@ -426,7 +426,9 @@
Unfortunately, some methods exposed by \l QString returning a \c QStringRef,
could not be moved to Qt5Compat. Therefore some manually porting may be
needed. If your code uses one or more of the following functions you need to
- port them to use \l QStringView or \l QStringTokenizer.
+ port them to use \l QStringView or \l QStringTokenizer. It is also
+ recommended to use \l {QStringView::tokenize} over \l {QStringView::split}
+ for performance critical code.
Change code using \c QStringRef:
\code
@@ -445,9 +447,9 @@
\code
QString string = ...;
- QStringView left = QStringView{string}.leftRef(n);
- QStringView mid = QStringView{string}.midRef(n);
- QStringView right = QStringView{string}.rightRef(n);
+ QStringView left = QStringView{string}.left(n);
+ QStringView mid = QStringView{string}.mid(n);
+ QStringView right = QStringView{string}.right(n);
QString value = ...;
const QList<QStringView> refs = QStringView{string}.split(u' ');