Clang: simplify column convertion calls

Pass QTextBlock directly into clangColumn call.

Change-Id: I3410a82ed9a84da66e7b430e2aefce64ec459db8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-02-01 13:27:50 +01:00
parent 4f20c0d4ed
commit eb1f85a971
4 changed files with 10 additions and 7 deletions

View File

@@ -347,8 +347,7 @@ ClangEditorDocumentProcessor::cursorInfo(const CppTools::CursorInfoParams &param
if (!isCursorOnIdentifier(params.textCursor))
return defaultCursorInfoFuture();
const QTextBlock block = params.textCursor.document()->findBlockByNumber(line - 1);
column = Utils::clangColumn(block.text(), column);
column = Utils::clangColumn(params.textCursor.document()->findBlockByNumber(line - 1), column);
const CppTools::SemanticInfo::LocalUseMap localUses
= CppTools::BuiltinCursorInfo::findLocalUses(params.semanticInfo.doc, line, column);