Simplify VCFilter::modifyPCHstage a bit

Merge two nested if blocks.
This reduces the diff size for a subsequent commit.

Change-Id: If60938077169fc6686329cc5c30ebc97ada013a1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Joerg Bornemann 2018-11-22 11:10:32 +01:00
parent 54fc1b5ae6
commit e5f94f0f05

View File

@ -2227,8 +2227,7 @@ void VCFilter::modifyPCHstage(QString str)
if(!isCFile && !isHFile && !isCPPFile) if(!isCFile && !isHFile && !isCPPFile)
return; return;
if(isHFile && pchThroughSourceFile) { if (isHFile && pchThroughSourceFile && Project->autogenPrecompSource) {
if (Project->autogenPrecompSource) {
useCustomBuildTool = true; useCustomBuildTool = true;
QString toFile(Project->precompSource); QString toFile(Project->precompSource);
CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ..."; CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
@ -2256,7 +2255,6 @@ void VCFilter::modifyPCHstage(QString str)
lines << "#include \"" + Project->precompHFilename + "\""; lines << "#include \"" + Project->precompHFilename + "\"";
for (const QString &line : qAsConst(lines)) for (const QString &line : qAsConst(lines))
CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile; CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile;
}
return; return;
} }