Commit bffaf9cc authored by Ulf Hermann's avatar Ulf Hermann

Qmake: Retrieve .h and .cpp extension variables with correct names

We will need them for more things than ui_*.h.

Change-Id: I394aa8646095cdafb426c15746243b27c1c1ab1b
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 2d4ea0b6
...@@ -1997,7 +1997,8 @@ EvalResult *QmakeProFileNode::evaluate(const EvalInput &input) ...@@ -1997,7 +1997,8 @@ EvalResult *QmakeProFileNode::evaluate(const EvalInput &input)
result->newVarValues[ObjCHeaderVar] = fileListForVar(input.readerExact, input.readerCumulative, result->newVarValues[ObjCHeaderVar] = fileListForVar(input.readerExact, input.readerCumulative,
QLatin1String("OBJECTIVE_HEADERS"), input.projectDir, input.buildDirectory); QLatin1String("OBJECTIVE_HEADERS"), input.projectDir, input.buildDirectory);
result->newVarValues[UiDirVar] = QStringList() << uiDirPath(input.readerExact, input.buildDirectory); result->newVarValues[UiDirVar] = QStringList() << uiDirPath(input.readerExact, input.buildDirectory);
result->newVarValues[UiHeaderExtensionVar] = QStringList() << input.readerExact->value(QLatin1String("QMAKE_EXT_H")); result->newVarValues[HeaderExtensionVar] = QStringList() << input.readerExact->value(QLatin1String("QMAKE_EXT_H"));
result->newVarValues[CppExtensionVar] = QStringList() << input.readerExact->value(QLatin1String("QMAKE_EXT_CPP"));
result->newVarValues[MocDirVar] = QStringList() << mocDirPath(input.readerExact, input.buildDirectory); result->newVarValues[MocDirVar] = QStringList() << mocDirPath(input.readerExact, input.buildDirectory);
result->newVarValues[ResourceVar] = fileListForVar(input.readerExact, input.readerCumulative, result->newVarValues[ResourceVar] = fileListForVar(input.readerExact, input.readerCumulative,
QLatin1String("RESOURCES"), input.projectDir, input.buildDirectory); QLatin1String("RESOURCES"), input.projectDir, input.buildDirectory);
...@@ -2578,7 +2579,7 @@ void QmakeProFileNode::updateUiFiles(const QString &buildDir) ...@@ -2578,7 +2579,7 @@ void QmakeProFileNode::updateUiFiles(const QString &buildDir)
// Find the UiDir, there can only ever be one // Find the UiDir, there can only ever be one
const Utils::FileName uiDir = uiDirectory(Utils::FileName::fromString(buildDir)); const Utils::FileName uiDir = uiDirectory(Utils::FileName::fromString(buildDir));
const QString uiExtensions = singleVariableValue(UiHeaderExtensionVar); const QString uiExtensions = singleVariableValue(HeaderExtensionVar);
foreach (const FileNode *uiFile, uiFiles) { foreach (const FileNode *uiFile, uiFiles) {
QString headerFile = uiHeaderFile(uiDir, uiFile->filePath(), uiExtensions); QString headerFile = uiHeaderFile(uiDir, uiFile->filePath(), uiExtensions);
if (!headerFile.isEmpty()) if (!headerFile.isEmpty())
......
...@@ -86,7 +86,8 @@ enum QmakeVariable { ...@@ -86,7 +86,8 @@ enum QmakeVariable {
ResourceVar, ResourceVar,
ExactResourceVar, ExactResourceVar,
UiDirVar, UiDirVar,
UiHeaderExtensionVar, HeaderExtensionVar,
CppExtensionVar,
MocDirVar, MocDirVar,
PkgConfigVar, PkgConfigVar,
PrecompiledHeaderVar, PrecompiledHeaderVar,
......
...@@ -870,7 +870,7 @@ QString QmakeProject::generatedUiHeader(const FileName &formFile) const ...@@ -870,7 +870,7 @@ QString QmakeProject::generatedUiHeader(const FileName &formFile) const
if (const QmakeProFileNode *pro = proFileNodeOf(rootProjectNode(), FormType, formFile)) if (const QmakeProFileNode *pro = proFileNodeOf(rootProjectNode(), FormType, formFile))
return QmakeProFileNode::uiHeaderFile( return QmakeProFileNode::uiHeaderFile(
pro->uiDirectory(Utils::FileName::fromString(pro->buildDir())), pro->uiDirectory(Utils::FileName::fromString(pro->buildDir())),
formFile, pro->singleVariableValue(QmakeVariable::UiHeaderExtensionVar)); formFile, pro->singleVariableValue(QmakeVariable::HeaderExtensionVar));
return QString(); return QString();
} }
......
Markdown is supported
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