forked from qt-creator/qt-creator
ClassView: Fix a crash when switching sessions
Move a code that operates on QIcon instances out from non-GUI thread into GUI thread. Instead of storing the QIcon directly inside ParserTreeItem, store the path to the project. Set the real icon when we are back on the main thread side. Rename some fields to start with m_ prefix. Task-number: QTCREATORBUG-25317 Task-number: QTCREATORBUG-25312 Change-Id: Iaff89c0995045b70c5378a2ff72c5deb74abf89e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -198,7 +198,7 @@ bool Manager::hasChildren(QStandardItem *item) const
|
||||
ParserTreeItem::ConstPtr ptr = findItemByRoot(item);
|
||||
if (ptr.isNull())
|
||||
return false;
|
||||
return ptr->childCount() != 0;
|
||||
return ptr->childCount();
|
||||
}
|
||||
|
||||
void Manager::initialize()
|
||||
@@ -245,7 +245,7 @@ void Manager::initialize()
|
||||
return;
|
||||
|
||||
QSharedPointer<QStandardItem> rootItem(new QStandardItem());
|
||||
d->m_root->convertTo(rootItem.data());
|
||||
d->m_root->fetchMore(rootItem.data());
|
||||
emit treeDataUpdate(rootItem);
|
||||
}, Qt::QueuedConnection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user