CMake: TeaLeafReader: Fix include path detection

Change-Id: Ifcd64836aef7fc69b3cc0d4c27a07293348b91a6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2016-11-14 11:58:19 +01:00
parent 247a6fea93
commit ff68d4cab1

View File

@@ -353,8 +353,8 @@ void TeaLeafReader::generateProjectTree(CMakeListsNode *root, const QList<FileNo
QSet<FileName> allIncludePathSet;
for (const CMakeBuildTarget &bt : m_buildTargets) {
const QList<Utils::FileName> targetIncludePaths
= Utils::filtered(bt.includeFiles, [root](const Utils::FileName &fn) {
return fn.isChildOf(root->filePath());
= Utils::filtered(bt.includeFiles, [this](const Utils::FileName &fn) {
return fn.isChildOf(m_parameters.sourceDirectory);
});
allIncludePathSet.unite(QSet<FileName>::fromList(targetIncludePaths));
}