Commit bc28670a authored by dt's avatar dt
Browse files

Fix always running of qmake

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