summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-06-29 16:56:57 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-07-13 14:26:46 +0000
commit339b9706ccbed4063a92337c9994731793558b0a (patch)
treea0c897531f010aaed01a5213bcfb071800852925 /qmake/project.cpp
parentb27d4835c2ae0d8767ca914acb72a4bdcea6fc85 (diff)
make error() propagate from custom replace functions
it didn't, which is rather unexpected. Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp9
1 files changed, 5 insertions, 4 deletions
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<ProStringList>
QHash<ProKey, ProFunctionDef>::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);
}