forked from qt-creator/qt-creator
ProjectModels: Use better way to retrieve project
Use a better way to retrieve the project from a containernode. Change-Id: I8b0a0aa86e823ef3b9cab512a1374f7fb77f1aa3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -111,10 +111,7 @@ QVariant FlatModel::data(const QModelIndex &index, int role) const
|
||||
if (folderNode) {
|
||||
static QIcon emptyIcon = Utils::Icons::EMPTY16.icon();
|
||||
if (ContainerNode *containerNode = folderNode->asContainerNode()) {
|
||||
WrapperNode *wn = wrapperForNode(node);
|
||||
Project *project = Utils::findOrDefault(SessionManager::projects(), [this, wn](const Project *p) {
|
||||
return nodeForProject(p) == wn;
|
||||
});
|
||||
Project *project = containerNode->project();
|
||||
if (project && project->isParsing())
|
||||
result = emptyIcon;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user