aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2025-11-12 16:51:34 +0100
committerhjk <hjk@qt.io>2025-11-13 09:42:00 +0000
commit690ff4bacd922436bf308ea399d3f0ee80d42fcc (patch)
tree8ae30efa372ad5b65ec261be110b9b1ebfe1b326 /src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
parentfadbd348a516f16b25863e2e04f14be2effda0a8 (diff)
Use QString::size() instead QString::length()
Minor gain in debug builds and when stepping. Change-Id: I2540d309661e4babfd7331b068c17657ded2a098 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp')
-rw-r--r--src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp b/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
index aa412ee31cf..c13a83aa4be 100644
--- a/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
+++ b/src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp
@@ -88,7 +88,7 @@ void ActivationSequenceContextProcessor::processStringLiteral()
QTextCursor selectionTextCursor = m_textCursor;
selectionTextCursor.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor);
QString selection = selectionTextCursor.selectedText();
- if (selection.indexOf(QLatin1Char('"')) < selection.length() - 1)
+ if (selection.indexOf(QLatin1Char('"')) < selection.size() - 1)
m_completionKind = CPlusPlus::T_EOF_SYMBOL;
}
}
@@ -278,7 +278,7 @@ void ActivationSequenceContextProcessor::goBackToStartOfName()
const int tokenStart = tokens.at(tokIndex).utf16charOffset;
const int slashIndex = m_textCursor.block().text().lastIndexOf(
'/',
- std::min(m_textCursor.positionInBlock(), int(m_textCursor.block().text().length() - 1)));
+ std::min(m_textCursor.positionInBlock(), int(m_textCursor.block().text().size() - 1)));
m_startOfNamePosition = m_textCursor.block().position() + std::max(slashIndex, tokenStart)
+ 1;
} else {