diff options
author | Anton Kudryavtsev <[email protected]> | 2024-03-14 20:00:49 +0300 |
---|---|---|
committer | Anton Kudryavtsev <[email protected]> | 2024-03-15 15:24:20 +0000 |
commit | 27a3d3ac9001eb467829397f4ad02355a8d51b2a (patch) | |
tree | f714ebcf7429ab5604c296ae51c7714589e2f957 | |
parent | 079d0cb5c06c415be7f731776b8df2daa4620173 (diff) |
QTextCursor: use QSV more
to avoid needless allocations
Change-Id: I081119f3ee08a1cc6ec16745518c2ed75042dbf2
Reviewed-by: MÃ¥rten Nordheim <[email protected]>
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index db2eb001cfb..5730f55e6a1 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1679,7 +1679,7 @@ static void getText(QString &text, QTextDocumentPrivate *priv, const QString &do const int offsetInFragment = qMax(0, pos - fragIt.position()); const int len = qMin(int(frag->size_array[0] - offsetInFragment), end - pos); - text += QString(docText.constData() + frag->stringPosition + offsetInFragment, len); + text += QStringView(docText.constData() + frag->stringPosition + offsetInFragment, len); pos += len; } } |