CppEditor: Store typedefed name for anonymous structs

... and use it as the struct display name in some places.

Fixes: QTCREATORBUG-26611
Change-Id: I1b127f5705307a0fabd2441ff871162c882927a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2022-09-14 16:16:09 +02:00
parent 2369dcc324
commit 0fab5956ea
5 changed files with 18 additions and 2 deletions

View File

@@ -635,6 +635,11 @@ void Class::addBaseClass(BaseClass *baseClass)
FullySpecifiedType Class::type() const
{ return FullySpecifiedType(const_cast<Class *>(this)); }
const Name *Class::prettyName() const
{
return _canonicalTypedefName ? _canonicalTypedefName : name();
}
void Class::visitSymbol0(SymbolVisitor *visitor)
{
if (visitor->visit(this)) {