make ProFileParser API less bug-prone

QString::isNull() vs. isEmpty() discrimination is a time bomb ...
This commit is contained in:
Oswald Buddenhagen
2010-09-02 18:06:11 +02:00
parent 34a8a57d81
commit 7322900692
5 changed files with 12 additions and 10 deletions

View File

@@ -1274,8 +1274,8 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::visitProFile(
tgt.append(ProString(QFileInfo(pro->fileName()).baseName(), NoHash));
if (!m_cmdArgs.isEmpty()) {
if (ProFile *pro = m_parser->parsedProFile(
fL1S("(command line)"), false, m_cmdArgs.join(fL1S("\n")))) {
if (ProFile *pro = m_parser->parsedProBlock(
fL1S("(command line)"), m_cmdArgs.join(fL1S("\n")))) {
m_locationStack.push(m_current);
visitProBlock(pro, pro->tokPtr());
m_current = m_locationStack.pop();
@@ -2420,8 +2420,8 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
case T_REQUIRES:
#endif
case T_EVAL: {
ProFile *pro = m_parser->parsedProFile(fL1S("(eval)"), false,
args.join(statics.field_sep));
ProFile *pro = m_parser->parsedProBlock(fL1S("(eval)"),
args.join(statics.field_sep));
if (!pro)
return ReturnFalse;
m_locationStack.push(m_current);