From 339b9706ccbed4063a92337c9994731793558b0a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 29 Jun 2016 16:56:57 +0200 Subject: make error() propagate from custom replace functions it didn't, which is rather unexpected. Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98 Reviewed-by: Joerg Bornemann --- qmake/project.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'qmake/project.cpp') diff --git a/qmake/project.cpp b/qmake/project.cpp index faea6da650..9c06f7ef5d 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -110,9 +110,8 @@ QStringList QMakeProject::expand(const ProKey &func, const QList QHash::ConstIterator it = m_functionDefs.replaceFunctions.constFind(func); if (it != m_functionDefs.replaceFunctions.constEnd()) { - QMakeProject::VisitReturn vr; - ProStringList ret = evaluateFunction(*it, args, &vr); - if (vr == QMakeProject::ReturnError) + ProStringList ret; + if (evaluateFunction(*it, args, &ret) == QMakeProject::ReturnError) exit(3); return ret.toQStringList(); } @@ -130,7 +129,9 @@ ProString QMakeProject::expand(const QString &expr, const QString &where, int li m_current.pro = pro; m_current.line = 0; const ushort *tokPtr = pro->tokPtr(); - ProStringList result = expandVariableReferences(tokPtr, 1, true); + ProStringList result; + if (expandVariableReferences(tokPtr, 1, &result, true) == ReturnError) + exit(3); if (!result.isEmpty()) ret = result.at(0); } -- cgit v1.2.3