more exact qmake command line parsing

support -after and -config.
this also moves the actual parsing to ProFileOption, where it belongs.
This commit is contained in:
Oswald Buddenhagen
2011-03-18 20:03:22 +01:00
parent 16436a252b
commit 08deb39072
4 changed files with 59 additions and 51 deletions

View File

@@ -34,7 +34,6 @@
#include "qmakestep.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <proparser/profileevaluator.h>
#include "qmakeparser.h"
#include "qt4buildconfiguration.h"
#include "qt4project.h"
@@ -370,20 +369,9 @@ void QMakeStep::setLinkQmlDebuggingLibrary(bool enable)
QStringList QMakeStep::parserArguments()
{
QStringList result;
for (Utils::QtcProcess::ConstArgIterator ait(allArguments()); ait.next(); ) {
const QString &arg = ait.value();
if (arg.contains(QLatin1Char('='))) {
result << arg;
} else {
for (int i = 0; i < ProFileOption::modeMapSize; ++i) {
// Workaround: Apple GCC does not like ProFileOption::modeMap[i], because the array's bounds are not known
if (QLatin1String((&ProFileOption::modeMap[0] + i)->qmakeOption) == arg) {
result << arg;
break;
}
}
}
}
for (Utils::QtcProcess::ConstArgIterator ait(allArguments()); ait.next(); )
if (ait.isSimple())
result << ait.value();
return result;
}