[Qt-creator] FindMethodDefinitionInsertPoint::operator() Bug

Lorenz Haas lykurg at gmail.com
Wed May 29 17:50:14 CEST 2013


Hi,

FindMethodDefinitionInsertPoint, operator(): The default position is set
to the end of a file via

_bestToken.maybeSet(-1, translationUnit()->ast()->lastToken());

Unfortunately this fails if the file behind translationUnit() only
contains #includes, since they seem to be not parsed in AST.

Since translationUnit() is already parsed
translationUnit()->firstSourceChar() is not really useful to get the
content of the file in order to determine the last insert position. The
only ways I came up with is a additional parameter or QFile +
translationUnit()->fileName() but that is surely not sophisticated...

Any help/suggestion, please, need that working for an other fix.


Best,
Lorenz



More information about the Qt-creator mailing list