Commit 8be83a17 authored by Daniel Teske's avatar Daniel Teske

Make sure we pass -after arguments after user arguments

Otherwise the user can't pass on normal arguments

Task-number: QTCREATORBUG-6346
Change-Id: I986563a75113a6d5acf601b5ccb63d6a35570bad
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 7b6ec0ac
......@@ -157,7 +157,11 @@ QString QMakeStep::allArguments(bool shorted)
arguments << moreArguments();
QString args = Utils::QtcProcess::joinArgs(arguments);
// User arguments
Utils::QtcProcess::addArgs(&args, m_userArgs);
// moreArgumentsAfter
foreach (const QString &arg, moreArgumentsAfter())
Utils::QtcProcess::addArg(&args, arg);
return args;
}
......@@ -195,19 +199,26 @@ QStringList QMakeStep::moreArguments()
}
}
return arguments;
}
QStringList QMakeStep::moreArgumentsAfter()
{
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
if (bc->qtVersion() && !bc->qtVersion()->supportsShadowBuilds()) {
// We have a target which does not allow shadow building.
// But we really don't want to have the build artefacts in the source dir
// so we try to hack around it, to make the common cases work.
// This is a HACK, remove once the symbian make generator supports
// shadow building
arguments << QLatin1String("-after")
<< QLatin1String("OBJECTS_DIR=obj")
<< QLatin1String("MOC_DIR=moc")
<< QLatin1String("UI_DIR=ui")
<< QLatin1String("RCC_DIR=rcc");
return QStringList() << QLatin1String("-after")
<< QLatin1String("OBJECTS_DIR=obj")
<< QLatin1String("MOC_DIR=moc")
<< QLatin1String("UI_DIR=ui")
<< QLatin1String("RCC_DIR=rcc");
}
return arguments;
return QStringList();
}
bool QMakeStep::init()
......
......@@ -100,6 +100,7 @@ public:
// TODO clean up those functions
QString allArguments(bool shorted = false);
QStringList moreArguments();
QStringList moreArgumentsAfter();
QStringList parserArguments();
QString userArguments();
QString mkspec();
......
......@@ -494,7 +494,7 @@ bool Qt4BuildConfiguration::compareToImportFrom(const QString &makefile)
// This copies the settings from userArgs to actualArgs (minus some we
// are not interested in), splitting them up into individual strings:
extractSpecFromArguments(&userArgs, workingDirectory, version, &actualArgs),
actualArgs += qs->moreArguments();
actualArgs = qs->moreArguments() + actualArgs + qs->moreArgumentsAfter();
QString actualSpec = qs->mkspec();
QString qmakeArgs = result.second;
......
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