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