Commit 5af04e6b authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

generalize visitCmdLine() a bit

it's basically the most generic unchecked eval function possible.

Change-Id: I8f6ec5c0f35d132500b80912f8d7b221bc183c85
Reviewed-by: default avatarDaniel Teske <>
parent 00e9be42
......@@ -1197,10 +1197,10 @@ void QMakeEvaluator::setupProject()
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 (ProFile *pro = m_parser->parsedProBlock(cmds, fL1S("(command line)"), -1)) {
if (ProFile *pro = m_parser->parsedProBlock(cmds, where, -1)) {
if (pro->isOk()) {
visitProBlock(pro, pro->tokPtr());
......@@ -1287,7 +1287,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
evaluateCommand(m_option->precmds, fL1S("(command line)"));
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()));
if (flags & LoadPostFiles) {
evaluateCommand(m_option->postcmds, fL1S("(command line -after)"));
......@@ -120,7 +120,7 @@ public:
bool loadSpec();
void initFrom(const QMakeEvaluator &other);
void setupProject();
void visitCmdLine(const QString &cmds);
void evaluateCommand(const QString &cmds, const QString &where);
VisitReturn visitProFile(ProFile *pro, QMakeHandler::EvalFileType type,
LoadFlags flags);
VisitReturn visitProBlock(ProFile *pro, const ushort *tokPtr);
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