QmlProfiler: adapt binding location at call to gotoLine

Change-Id: Iceff7120a5e88181e5aad452d3f0f90b3215ce1d
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2012-05-10 12:32:41 +02:00
committed by Kai Koehne
parent d1224783d5
commit 9694dcffd1

View File

@@ -497,7 +497,9 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber,
if (textEditor) {
editorManager->addCurrentPositionToNavigationHistory();
textEditor->gotoLine(lineNumber, columnNumber);
// textEditor counts columns starting with 0, but the ASTs store the
// location starting with 1, therefore the -1 in the call to gotoLine
textEditor->gotoLine(lineNumber, columnNumber - 1);
textEditor->widget()->setFocus();
}
}