CppTypeHierarchy: Don't create/store QIcon in non-GUI thread

Store Utils::CodeModelIcon::Type enum instead.
Drop unneeded CPlusPlus::Symbol *declaration from CppDeclarableElement.
Remove unused CppClass::operator==().

Task-number: QTCREATORBUG-28529
Change-Id: Ie3487fa5f73d714ef375c42f1e64023ccc4194ee
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2022-12-07 11:28:12 +01:00
parent d8343b4b46
commit e2155a91df
3 changed files with 4 additions and 12 deletions

View File

@@ -94,8 +94,7 @@ public:
// CppDeclarableElement
CppDeclarableElement::CppDeclarableElement(Symbol *declaration)
: CppElement()
, declaration(declaration)
, icon(Icons::iconForSymbol(declaration))
, iconType(Icons::iconTypeForSymbol(declaration))
{
Overview overview;
overview.showArgumentNames = true;
@@ -135,11 +134,6 @@ CppClass::CppClass(Symbol *declaration) : CppDeclarableElement(declaration)
tooltip = qualifiedName;
}
bool CppClass::operator==(const CppClass &other)
{
return this->declaration == other.declaration;
}
CppClass *CppClass::toCppClass()
{
return this;