forked from qt-creator/qt-creator
Clang: Add commentary about column convertion
... to/from utf8 byte offset used by Clang. Change-Id: I294d6cd61b416e5f2d64206ee2f3f1b4a91fb1d3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -348,8 +348,7 @@ ClangEditorDocumentProcessor::cursorInfo(const CppTools::CursorInfoParams ¶m
|
||||
return defaultCursorInfoFuture();
|
||||
|
||||
const QTextBlock block = params.textCursor.document()->findBlockByNumber(line - 1);
|
||||
const QString stringOnTheLeft = block.text().left(column);
|
||||
column = stringOnTheLeft.toUtf8().size() + 1; // '+ 1' is for 1-based columns
|
||||
column = Utils::clangColumn(block.text(), column);
|
||||
const CppTools::SemanticInfo::LocalUseMap localUses
|
||||
= CppTools::BuiltinCursorInfo::findLocalUses(params.semanticInfo.doc, line, column);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user