diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-04-04 15:50:11 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-04-08 22:15:04 +0000 |
commit | 71e6c40cc236199d853181f6ac02cedcc4bf08f7 (patch) | |
tree | fe4abe63fdaf113169c7a3182fa795f43496744a /src/tools | |
parent | 51176c92ffebb37fba5871b5753ad33c5b0c939b (diff) |
UnitTests: More QString fixes
Change-Id: Id1c60dfa8b3ada2c855f43437a153042cfec9f63
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/clangbackend/source/codecompleter.cpp | 2 | ||||
-rw-r--r-- | src/tools/clangbackend/source/codecompletionsextractor.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/clangbackend/source/codecompleter.cpp b/src/tools/clangbackend/source/codecompleter.cpp index 0613adf146..c46118a20c 100644 --- a/src/tools/clangbackend/source/codecompleter.cpp +++ b/src/tools/clangbackend/source/codecompleter.cpp @@ -130,7 +130,7 @@ static QString tweakName(const Utf8String &oldName) if (!oldName.contains('>')) return QString(); - QString fullName = QString(oldName).trimmed(); + QString fullName = oldName.toString().trimmed(); if (!fullName.endsWith('>')) { // This is the class<type>::method case - remove ::method part if (!fullName.endsWith("create") || !fullName.contains("QSharedPointer")) diff --git a/src/tools/clangbackend/source/codecompletionsextractor.cpp b/src/tools/clangbackend/source/codecompletionsextractor.cpp index 065a589539..0a0265829f 100644 --- a/src/tools/clangbackend/source/codecompletionsextractor.cpp +++ b/src/tools/clangbackend/source/codecompletionsextractor.cpp @@ -361,8 +361,8 @@ SourceRangeContainer toRangeContainer(const UnsavedFile &file, CXSourceRange cxS QTC_ASSERT(startLine == endLine, return SourceRangeContainer();); const Utf8String lineText = file.lineRange(startLine, endLine); - startColumn = QString(lineText.mid(0, startColumn - 1)).size() + 1; - endColumn = QString(lineText.mid(0, endColumn - 1)).size() + 1; + startColumn = lineText.mid(0, startColumn - 1).toString().size() + 1; + endColumn = lineText.mid(0, endColumn - 1).toString().size() + 1; return SourceRangeContainer(SourceLocationContainer(file.filePath(), startLine, startColumn), SourceLocationContainer(file.filePath(), endLine, endColumn)); |