Fix type of VcprojGenerator::extraCompilerOutputs

The values of this hash are strings, not lists of strings.
Enforce this by using the proper type instead of just using a comment.

Change-Id: Id8a13acdceb8f9f8a9a8eaa04e790b1e6cd5faa7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Joerg Bornemann 2016-11-28 17:46:22 +01:00 committed by Jani Heikkinen
parent feb95effc4
commit fe0b91879b
3 changed files with 5 additions and 5 deletions

View File

@ -2260,10 +2260,10 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
QString inFile = info.file; QString inFile = info.file;
// is the extracompiler rule on a file with a built in compiler? // is the extracompiler rule on a file with a built in compiler?
const QStringList &objectMappedFile = Project->extraCompilerOutputs[inFile]; const QString objectMappedFile = Project->extraCompilerOutputs.value(inFile);
bool hasBuiltIn = false; bool hasBuiltIn = false;
if (!objectMappedFile.isEmpty()) { if (!objectMappedFile.isEmpty()) {
hasBuiltIn = Project->hasBuiltinCompiler(objectMappedFile.at(0)); hasBuiltIn = Project->hasBuiltinCompiler(objectMappedFile);
// qDebug("*** Extra compiler file has object mapped file '%s' => '%s'", qPrintable(inFile), qPrintable(objectMappedFile.join(' '))); // qDebug("*** Extra compiler file has object mapped file '%s' => '%s'", qPrintable(inFile), qPrintable(objectMappedFile.join(' ')));
} }
@ -2305,7 +2305,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
// compiler, too bad.. // compiler, too bad..
if (hasBuiltIn) { if (hasBuiltIn) {
out = inFile; out = inFile;
inFile = objectMappedFile.at(0); inFile = objectMappedFile;
} }
// Dependency for the output // Dependency for the output

View File

@ -889,7 +889,7 @@ void VcprojGenerator::init()
QString out = Option::fixPathToTargetOS(replaceExtraCompilerVariables( QString out = Option::fixPathToTargetOS(replaceExtraCompilerVariables(
compiler_out, file, QString(), NoShell), false); compiler_out, file, QString(), NoShell), false);
extraCompilerSources[out] += quc.toQString(); extraCompilerSources[out] += quc.toQString();
extraCompilerOutputs[out] = QStringList(file); // Can only have one extraCompilerOutputs[out] = file;
} }
} }
} }

View File

@ -63,7 +63,7 @@ public:
static bool hasBuiltinCompiler(const QString &file); static bool hasBuiltinCompiler(const QString &file);
QHash<QString, QStringList> extraCompilerSources; QHash<QString, QStringList> extraCompilerSources;
QHash<QString, QStringList> extraCompilerOutputs; QHash<QString, QString> extraCompilerOutputs;
bool usePCH; bool usePCH;
VCProjectWriter *projectWriter; VCProjectWriter *projectWriter;