Fix qmake's use of Q_ASSERT with side-effects.
The nice side-effect of having Q_ASSERT use the condition twice is that we break code that has side-effects. Change-Id: Ia0b7ed2a8030c8e222612af95eb2d58671433110 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
4ba9cecec2
commit
af3c7d35b6
@ -1721,7 +1721,8 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
|
||||
function_blocks.push(defined);
|
||||
QStringList ret;
|
||||
defined->exec(args_list, this, place, ret);
|
||||
Q_ASSERT(function_blocks.pop() == defined);
|
||||
bool correct = function_blocks.pop() == defined;
|
||||
Q_ASSERT(correct); Q_UNUSED(correct);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2206,7 +2207,8 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QHash<QS
|
||||
QStringList ret;
|
||||
function_blocks.push(defined);
|
||||
defined->exec(args_list, this, place, ret);
|
||||
Q_ASSERT(function_blocks.pop() == defined);
|
||||
bool correct = function_blocks.pop() == defined;
|
||||
Q_ASSERT(correct); Q_UNUSED(correct);
|
||||
|
||||
if(ret.isEmpty()) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user