forked from qt-creator/qt-creator
generalize visitCmdLine() a bit
it's basically the most generic unchecked eval function possible. Change-Id: I8f6ec5c0f35d132500b80912f8d7b221bc183c85 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -1197,10 +1197,10 @@ void QMakeEvaluator::setupProject()
|
|||||||
vars[ProKey("OUT_PWD")] << ProString(m_outputDir);
|
vars[ProKey("OUT_PWD")] << ProString(m_outputDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeEvaluator::visitCmdLine(const QString &cmds)
|
void QMakeEvaluator::evaluateCommand(const QString &cmds, const QString &where)
|
||||||
{
|
{
|
||||||
if (!cmds.isEmpty()) {
|
if (!cmds.isEmpty()) {
|
||||||
if (ProFile *pro = m_parser->parsedProBlock(cmds, fL1S("(command line)"), -1)) {
|
if (ProFile *pro = m_parser->parsedProBlock(cmds, where, -1)) {
|
||||||
if (pro->isOk()) {
|
if (pro->isOk()) {
|
||||||
m_locationStack.push(m_current);
|
m_locationStack.push(m_current);
|
||||||
visitProBlock(pro, pro->tokPtr());
|
visitProBlock(pro, pro->tokPtr());
|
||||||
@@ -1287,7 +1287,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
|||||||
|
|
||||||
evaluateFeatureFile(QLatin1String("default_pre.prf"));
|
evaluateFeatureFile(QLatin1String("default_pre.prf"));
|
||||||
|
|
||||||
visitCmdLine(m_option->precmds);
|
evaluateCommand(m_option->precmds, fL1S("(command line)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
debugMsg(1, "visiting file %s", qPrintable(pro->fileName()));
|
debugMsg(1, "visiting file %s", qPrintable(pro->fileName()));
|
||||||
@@ -1295,7 +1295,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
|||||||
debugMsg(1, "done visiting file %s", qPrintable(pro->fileName()));
|
debugMsg(1, "done visiting file %s", qPrintable(pro->fileName()));
|
||||||
|
|
||||||
if (flags & LoadPostFiles) {
|
if (flags & LoadPostFiles) {
|
||||||
visitCmdLine(m_option->postcmds);
|
evaluateCommand(m_option->postcmds, fL1S("(command line -after)"));
|
||||||
|
|
||||||
evaluateFeatureFile(QLatin1String("default_post.prf"));
|
evaluateFeatureFile(QLatin1String("default_post.prf"));
|
||||||
|
|
||||||
|
@@ -120,7 +120,7 @@ public:
|
|||||||
bool loadSpec();
|
bool loadSpec();
|
||||||
void initFrom(const QMakeEvaluator &other);
|
void initFrom(const QMakeEvaluator &other);
|
||||||
void setupProject();
|
void setupProject();
|
||||||
void visitCmdLine(const QString &cmds);
|
void evaluateCommand(const QString &cmds, const QString &where);
|
||||||
VisitReturn visitProFile(ProFile *pro, QMakeHandler::EvalFileType type,
|
VisitReturn visitProFile(ProFile *pro, QMakeHandler::EvalFileType type,
|
||||||
LoadFlags flags);
|
LoadFlags flags);
|
||||||
VisitReturn visitProBlock(ProFile *pro, const ushort *tokPtr);
|
VisitReturn visitProBlock(ProFile *pro, const ushort *tokPtr);
|
||||||
|
Reference in New Issue
Block a user