forked from qt-creator/qt-creator
CppTools: Do not try to find definitions of generated symbols
This speeds up the quick fix InsertDefFromDecl on function declarations in classes containing Q_OBJECT. Task-number: QTCREATORBUG-9877 Change-Id: I0af16f17f40735040b7158a3191c13db3433edf9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lorenz Haas <lykurg@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -498,8 +498,7 @@ static InsertionLocation nextToSurroundingDefinitions(Symbol *declaration,
|
||||
Declaration *surroundingFunctionDecl = 0;
|
||||
for (int i = declIndex - 1; i >= 0; --i) {
|
||||
Symbol *s = klass->memberAt(i);
|
||||
surroundingFunctionDecl = isNonVirtualFunctionDeclaration(s);
|
||||
if (!surroundingFunctionDecl)
|
||||
if (s->isGenerated() || !(surroundingFunctionDecl = isNonVirtualFunctionDeclaration(s)))
|
||||
continue;
|
||||
if ((definitionFunction = symbolFinder.findMatchingDefinition(surroundingFunctionDecl,
|
||||
changes.snapshot())))
|
||||
|
||||
Reference in New Issue
Block a user