diff options
author | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-13 16:50:18 +0300 |
---|---|---|
committer | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-09-15 13:04:18 +0300 |
commit | 61160aaf85a73939b64c495379c2d5e4dabf00cb (patch) | |
tree | 9732f2c911a93e86698370cc1ef30fb19d62281e /src/quick/items/qquicktextinput.cpp | |
parent | ff0cbaeba3dfc11dde5445b9ea919f1ae137ea2f (diff) |
qquicktextinput: use const method more
to avoid implicit detach
Change-Id: I8b225b607698f468a35ba78948afb2e218430e96
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextinput.cpp')
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index ea53e3b77c..d247c81eb3 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -3618,7 +3618,7 @@ void QQuickTextInputPrivate::selectWordAtPos(int cursor) moveCursor(c, false); // ## text layout should support end of words. int end = m_textLayout.nextCursorPosition(c, QTextLayout::SkipWords); - while (end > cursor && m_text[end-1].isSpace()) + while (end > cursor && m_text.at(end - 1).isSpace()) --end; moveCursor(end, true); } |