ClangTools/QMake: Stop analyzing files not part of build configuration

...for the qmake project manager.

When parsing the project files, remember whether a file was discovered
by the exact or cumulative parse. Only files that were discovered by the
exact parse are considered "active" and thus part of the build
configuration. The others are not offered for selection.

Fixes: QTCREATORBUG-16016
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I7a28b4de15e048975d7f0cd737dd8c11f744315b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-01-04 09:07:55 +01:00
parent e4f488cb5c
commit 820e4f8177
12 changed files with 59 additions and 40 deletions

View File

@@ -77,8 +77,10 @@ static FileInfos sortedFileInfos(const QVector<CppTools::ProjectPart::Ptr> &proj
if (file.path == CppTools::CppModelManager::configurationFileName())
continue;
if (CppTools::ProjectFile::isSource(file.kind)) {
fileInfos.emplace_back(Utils::FileName::fromString(file.path), file.kind, projectPart);
if (file.active && CppTools::ProjectFile::isSource(file.kind)) {
fileInfos.emplace_back(Utils::FileName::fromString(file.path),
file.kind,
projectPart);
}
}
}