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

@@ -53,7 +53,10 @@ static void path_helper(Symbol *symbol,
if (ns && ns->isInline())
return;
}
addNames(symbol->name(), names);
if (symbol->asClass())
addNames(symbol->asClass()->prettyName(), names);
else
addNames(symbol->name(), names);
} else if (symbol->asObjCClass() || symbol->asObjCBaseClass() || symbol->asObjCProtocol()
|| symbol->asObjCForwardClassDeclaration() || symbol->asObjCForwardProtocolDeclaration()