Utils: Fix parentheses parsing in arguments iteration

Opening parenthesis is stored in the value, but closing parenthesis
is not. This makes the value unbalanced.

Since the parenthesis unconditionally unset m_simple, the value is
cleared anyway and is never read.

In case that math (or other) expression will ever be evaluated, this
needs to be reworked to include both parentheses.

Change-Id: Ie56f5a5d9cec5a47649751db4245888bee8e85d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-03-07 20:22:32 +02:00
committed by Orgad Shaneh
parent dbb9891f43
commit 220882128a

View File

@@ -1436,6 +1436,7 @@ bool QtcProcess::ArgIterator::next()
state.current = MxParen;
m_simple = false;
hadWord = true;
continue;
#if 0 // Should match only at the beginning of a command, which we never have currently.
} else if (cc == '{') {
sstack.push(state);