Commit bc28670a authored by dt's avatar dt

Fix always running of qmake

parent 60b663d5
......@@ -106,6 +106,31 @@ QStringList QMakeStep::allArguments()
if (!additonalArguments.contains("-spec"))
arguments << "-spec" << bc->qtVersion()->mkspec();
// Find out what flags we pass on to qmake
QStringList addedUserConfigArguments;
QStringList removedUserConfigArguments;
bc->getConfigCommandLineArguments(&addedUserConfigArguments, &removedUserConfigArguments);
if (!removedUserConfigArguments.isEmpty()) {
foreach (const QString &removedConfig, removedUserConfigArguments)
arguments.append("CONFIG-=" + removedConfig);
}
if (!addedUserConfigArguments.isEmpty()) {
foreach (const QString &addedConfig, addedUserConfigArguments)
arguments.append("CONFIG+=" + addedConfig);
}
arguments << moreArguments();
if (!additonalArguments.isEmpty())
arguments << additonalArguments;
return arguments;
}
QStringList QMakeStep::moreArguments()
{
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
QStringList arguments;
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
ToolChain::ToolChainType type = bc->toolChainType();
if (type == ToolChain::GCC_MAEMO)
......@@ -125,24 +150,8 @@ QStringList QMakeStep::allArguments()
<< QLatin1String("RCC_DIR=rcc");
}
// Find out what flags we pass on to qmake
QStringList addedUserConfigArguments;
QStringList removedUserConfigArguments;
bc->getConfigCommandLineArguments(&addedUserConfigArguments, &removedUserConfigArguments);
if (!removedUserConfigArguments.isEmpty()) {
foreach (const QString &removedConfig, removedUserConfigArguments)
arguments.append("CONFIG-=" + removedConfig);
}
if (!addedUserConfigArguments.isEmpty()) {
foreach (const QString &addedConfig, addedUserConfigArguments)
arguments.append("CONFIG+=" + addedConfig);
}
if (!additonalArguments.isEmpty())
arguments << additonalArguments;
arguments << QLatin1String(Constants::QMAKEVAR_QMLINSPECTOR_PATH) + QLatin1Char('=') +
Core::ICore::instance()->resourcePath() + QLatin1String("/qmljsdebugger");
return arguments;
}
......
......@@ -86,6 +86,7 @@ public:
bool forced();
QStringList allArguments();
QStringList moreArguments();
QStringList userArguments();
void setUserArguments(const QStringList &arguments);
......
......@@ -452,7 +452,9 @@ bool Qt4BuildConfiguration::compareToImportFrom(const QString &workingDirectory)
QString parsedSpec = extractSpecFromArgumentList(result.second, workingDirectory, version);
QStringList actualArgs = removeSpecFromArgumentList(qs->userArguments());
QStringList actualArgs = qs->moreArguments();
actualArgs << qs->userArguments();
actualArgs = removeSpecFromArgumentList(actualArgs);
QStringList parsedArgs = removeSpecFromArgumentList(result.second);
if (debug) {
......
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