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:
@@ -634,9 +634,12 @@ QStringList CMakeProject::filesGeneratedFrom(const QString &sourceFile) const
|
||||
|
||||
ProjectExplorer::DeploymentKnowledge CMakeProject::deploymentKnowledge() const
|
||||
{
|
||||
return contains(files(AllFiles), [](const FilePath &f) {
|
||||
return f.fileName() == "QtCreatorDeployment.txt";
|
||||
}) ? DeploymentKnowledge::Approximative : DeploymentKnowledge::Bad;
|
||||
return !files([](const ProjectExplorer::Node *n) {
|
||||
return n->filePath().fileName() == "QtCreatorDeployment.txt";
|
||||
})
|
||||
.isEmpty()
|
||||
? DeploymentKnowledge::Approximative
|
||||
: DeploymentKnowledge::Bad;
|
||||
}
|
||||
|
||||
MakeInstallCommand CMakeProject::makeInstallCommand(const Target *target,
|
||||
|
||||
Reference in New Issue
Block a user