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/libs/cplusplus/MatchingText.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/libs/cplusplus/MatchingText.cpp')
| -rw-r--r-- | src/libs/cplusplus/MatchingText.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/cplusplus/MatchingText.cpp b/src/libs/cplusplus/MatchingText.cpp index 012a4ea582a..edeffe24370 100644 --- a/src/libs/cplusplus/MatchingText.cpp +++ b/src/libs/cplusplus/MatchingText.cpp @@ -92,7 +92,7 @@ static bool insertQuote(const QChar ch, const BackwardsScanner &tk) static int countSkippedChars(const QString &blockText, const QString &textToProcess) { int skippedChars = 0; - const int length = qMin(blockText.length(), textToProcess.length()); + const int length = qMin(blockText.size(), textToProcess.size()); for (int i = 0; i < length; ++i) { const QChar ch1 = blockText.at(i); const QChar ch2 = textToProcess.at(i); @@ -589,7 +589,7 @@ QString MatchingText::insertMatchingQuote(const QTextCursor &cursor, const QStri const QChar ch = text.at(0); if (!isQuote(ch)) return QString(); - if (text.length() != 1) + if (text.size() != 1) qWarning() << Q_FUNC_INFO << "handle event compression"; BackwardsScanner tk(tc, LanguageFeatures::defaultFeatures(), MAX_NUM_LINES, |
