QmlOutline: Don't use LookupContext due to performance issues

Creating a LookupContext can be sloooow for large projects. We create
one instance for every update in the Outline to get the right icons.

Take a shortcut here and just use the element name directly, ignoring
packages names etc.

This is a hot fix for 2.1, a following patch will change the Icon
retrieval API accordingly.

Reviewed-by: Roberto Raggi
Task-number: QTCREATORBUG-2859
This commit is contained in:
Kai Koehne
2010-10-22 13:38:20 +02:00
parent 75e2d42448
commit c7e47f53bc
2 changed files with 10 additions and 26 deletions

View File

@@ -120,7 +120,6 @@ private:
QStandardItem *m_currentItem;
QmlJS::Icons *m_icons;
QmlJS::LookupContext::Ptr m_context;
QHash<QString, QIcon> m_typeToIcon;
QHash<QmlOutlineItem*,QIcon> m_itemToIcon;
QHash<QmlOutlineItem*,QmlJS::AST::Node*> m_itemToNode;