Commit a7ed20fa authored by Christian Kandeler's avatar Christian Kandeler
Browse files

QbsProjectManager: Do not interpret Project::GeneratedFiles literally

The files retrieved by calling Project::files() with this flag show up
in the locator, in search results etc. So only consider files that we
know to be human-readable.

Task-number: QTCREATORBUG-17382
Change-Id: I7a66159e67207a09adb57b0c5584b0b067fd1fca
Reviewed-by: Eike Ziller's avatarEike Ziller <>
Reviewed-by: default avatarNikolai Kosjar <>
parent 8ed4685b
......@@ -174,8 +174,21 @@ static void collectFilesForProject(const qbs::ProjectData &project, Project::Fil
if (mode & Project::GeneratedFiles) {
foreach (const qbs::ProductData &prd, project.products()) {
foreach (const qbs::ArtifactData &artifact, prd.generatedArtifacts())
foreach (const qbs::ArtifactData &artifact, prd.generatedArtifacts()) {
// A list of human-readable file types that we can reasonably expect
// to get generated during a build. Extend as needed.
static const QSet<QString> sourceTags = {
QLatin1String("c"), QLatin1String("cpp"), QLatin1String("hpp"),
QLatin1String("objc"), QLatin1String("objcpp"),
QLatin1String("c_pch_src"), QLatin1String("cpp_pch_src"),
QLatin1String("objc_pch_src"), QLatin1String("objcpp_pch_src"),
QLatin1String("asm"), QLatin1String("asm_cpp"),
QLatin1String("qrc"), QLatin1String("")
if (artifact.fileTags().toSet().intersects(sourceTags))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment