CppEditor: Also rename function comments for declarations

... that are not definitions.
Amends 0a058bb657.

Change-Id: I4ba19f915d653d05570f8cd244ea50ab40d4b9dd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-11-22 18:05:06 +01:00
parent 1f34461088
commit 711b976294
3 changed files with 17 additions and 2 deletions

View File

@@ -128,7 +128,6 @@ protected:
bool visit(UsingNamespaceDirective *) override { return false; }
bool visit(UsingDeclaration *) override { return false; }
bool visit(NamespaceAlias *) override { return false; }
bool visit(Declaration *) override { return false; }
bool visit(Argument *) override { return false; }
bool visit(TypenameArgument *) override { return false; }
bool visit(BaseClass *) override { return false; }
@@ -158,6 +157,13 @@ protected:
return true;
}
bool visit(Declaration *decl) override
{
if (const auto func = decl->type().type()->asFunctionType())
return process(func);
return false;
}
// Objective-C
bool visit(ObjCBaseClass *) override { return false; }
bool visit(ObjCBaseProtocol *) override { return false; }