diff options
| author | hjk <hjk@qt.io> | 2025-11-12 16:51:34 +0100 |
|---|---|---|
| committer | hjk <hjk@qt.io> | 2025-11-13 09:42:00 +0000 |
| commit | 690ff4bacd922436bf308ea399d3f0ee80d42fcc (patch) | |
| tree | 8ae30efa372ad5b65ec261be110b9b1ebfe1b326 /src/plugins/clangcodemodel/clangactivationsequencecontextprocessor.cpp | |
| parent | fadbd348a516f16b25863e2e04f14be2effda0a8 (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.cpp | 4 |
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 { |
