Project: Make Project::file take a std::function to match files

Make Project::files take a standard function to match files with instead
of an enum (and a std::function).

Change-Id: I6a24e40dba0e972ff96c0a57e775d2377e2545e0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2017-12-06 10:58:59 +01:00
parent 18f38ff18e
commit f542e24eca
5 changed files with 40 additions and 28 deletions

View File

@@ -177,7 +177,7 @@ bool NimProject::supportsKit(Kit *k, QString *errorMessage) const
FileNameList NimProject::nimFiles() const
{
return files(AllFiles, [](const ProjectExplorer::Node *n) { return n->filePath().endsWith(".nim"); });
return files([](const ProjectExplorer::Node *n) { return AllFiles(n) && n->filePath().endsWith(".nim"); });
}
QVariantMap NimProject::toMap() const