aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/classview/classviewparser.cpp
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-02 14:17:12 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-11-09 08:51:21 +0000
commit8469e317c9c02bc9760a69ecadb79f396a541eb8 (patch)
treef640379bc065daa8dcf876cf4eb0e311ed8db188 /src/plugins/classview/classviewparser.cpp
parent3d939458408d0d61d8f9b05e9b5caec4bc7a6c1b (diff)
Utils: Adjust column numbers affected by convertPosition change
convertPosition change was introduced in 931ec39f64a. 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>
Diffstat (limited to 'src/plugins/classview/classviewparser.cpp')
-rw-r--r--src/plugins/classview/classviewparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/classview/classviewparser.cpp b/src/plugins/classview/classviewparser.cpp
index e206b180a1b..edf7a038ced 100644
--- a/src/plugins/classview/classviewparser.cpp
+++ b/src/plugins/classview/classviewparser.cpp
@@ -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