diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-11-25 20:41:20 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-12-13 18:55:19 +0000 |
commit | 80e63223f80643a93255cde9e0a4e82c705b2262 (patch) | |
tree | 28b05c8a647f4db2debf4161c1db294cb9ed2383 /qmake/project.cpp | |
parent | c0842aceaf9881caba798f2569e6e1cf03ce7f70 (diff) |
make qmake abort when $$prompt() gets EOF
otherwise, infinite loops can result, as amply demonstrated by the new
configure (which duly replicated the old configures' behavior ...).
QMakeEvaluator::evaluateBuiltinExpand() now returns a VisitReturn like
all other evaluate*() functions. the string list return value is now an
out parameter; i used a reference instead of a pointer to avoid
adjusting 56 usages of it.
Task-number: QTBUG-13964
Change-Id: I51ca7df8d694c6ffe9d9899cba414b1b46f5ce95
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r-- | qmake/project.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index 2f8411d52f..3a073b0954 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -99,8 +99,12 @@ QStringList QMakeProject::expand(const ProKey &func, const QList<ProStringList> { m_current.clear(); - if (int func_t = statics.expands.value(func)) - return evaluateBuiltinExpand(func_t, func, prepareBuiltinArgs(args)).toQStringList(); + if (int func_t = statics.expands.value(func)) { + ProStringList ret; + if (evaluateBuiltinExpand(func_t, func, prepareBuiltinArgs(args), ret) == ReturnError) + exit(3); + return ret.toQStringList(); + } QHash<ProKey, ProFunctionDef>::ConstIterator it = m_functionDefs.replaceFunctions.constFind(func); |