ProjectNodes: add listInProject() to Node

Add a setter/getter for listInProject to Node and make the project
list all nodes with this property set in Project::files.

Task-number: QTCREATORBUG-18132
Change-Id: I334e627856d1bc0d033e13c5d629f6657d8d7fee
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2017-05-03 13:46:02 +02:00
parent b0f1aa98a8
commit 0a3409112b
7 changed files with 40 additions and 16 deletions

View File

@@ -531,8 +531,8 @@ 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 QStringList fileList = files(SourceFiles, [&fileExtensions](const FileNode *fn) {
const QString fp = fn->filePath().toString();
const QStringList fileList = files(SourceFiles, [&fileExtensions](const Node *n) {
const QString fp = n->filePath().toString();
const int pos = fp.lastIndexOf('.');
return pos >= 0 && fileExtensions.contains(fp.mid(pos + 1));
});