forked from qt-creator/qt-creator
Project: Avoid copying the entire files(...) list
Avoid copying the entire list of files known to a project just to filter out a couple of files from it. Change-Id: I58b2e323f9678058ba482353eb777a55189fe05d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -764,7 +764,11 @@ static void notifyChangedHelper(const FilePath &fileName, QmakeProFile *file)
|
||||
void QmakeProject::notifyChanged(const FilePath &name)
|
||||
{
|
||||
for (QmakeProject *project : s_projects) {
|
||||
if (project->files(QmakeProject::SourceFiles).contains(name))
|
||||
if (!project
|
||||
->files([&name](const ProjectExplorer::Node *n) {
|
||||
return Project::SourceFiles(n) && n->filePath() == name;
|
||||
})
|
||||
.isEmpty())
|
||||
notifyChangedHelper(name, project->rootProFile());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user