forked from qt-creator/qt-creator
Utils: Adjust column numbers affected by convertPosition change
convertPosition change was introduced in 931ec39f64.
It changed 0-based column to 1-based which is how it
naturally is in Qt Creator.
This fixed some usages but broke many more. This is an
attempt to fix the remaining use cases.
Fixes CppEditor auto-tests.
Change-Id: Ia8d14da0ebb035cd2fdd6da4ff6ec89c1c5121a8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -369,9 +369,9 @@ void Parser::addSymbol(const ParserTreeItem::Ptr &item, const CPlusPlus::Symbol
|
||||
if (itemAdd.isNull())
|
||||
itemAdd = ParserTreeItem::Ptr(new ParserTreeItem());
|
||||
|
||||
// locations are 1-based in Symbol, start with 0 for the editor
|
||||
// locations have 1-based column in Symbol, use the same here.
|
||||
SymbolLocation location(QString::fromUtf8(symbol->fileName() , symbol->fileNameLength()),
|
||||
symbol->line(), symbol->column() - 1);
|
||||
symbol->line(), symbol->column());
|
||||
itemAdd->addSymbolLocation(location);
|
||||
|
||||
// prevent showing a content of the functions
|
||||
|
||||
Reference in New Issue
Block a user