forked from qt-creator/qt-creator
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:
@@ -728,7 +728,9 @@ void CMakeProject::createGeneratedCodeModelSupport()
|
||||
= Utils::transform<QSet>(factories, [](const ExtraCompilerFactory *f) { return f->sourceTag(); });
|
||||
|
||||
// Find all files generated by any of the extra compilers, in a rather crude way.
|
||||
const FileNameList fileList = files(SourceFiles, [&fileExtensions](const Node *n) {
|
||||
const FileNameList fileList = files([&fileExtensions](const Node *n) {
|
||||
if (!SourceFiles(n))
|
||||
return false;
|
||||
const QString fp = n->filePath().toString();
|
||||
const int pos = fp.lastIndexOf('.');
|
||||
return pos >= 0 && fileExtensions.contains(fp.mid(pos + 1));
|
||||
|
||||
Reference in New Issue
Block a user