summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-18 11:17:06 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-25 13:54:43 +0000
commit962c7ab6f8705a8fb7b60c3544d4189503c1ec17 (patch)
tree3eeb1bedab0a7be94f96a31e801771e385a979da /qmake
parentda1aaed059d8a871c7f9cef3980ed85c71df7323 (diff)
always flush scopes on closing brace
without that, both the lines cond1 { cond2: VAR = val } and cond1 { cond2: else: cond3 } would yield two bogus errors: first an excess brace, and then a missing one. Change-Id: I8609106c1ad387577deec2077e2ce13507ac4d3f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/library/qmakeparser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp
index 61331f4348..18048502aa 100644
--- a/qmake/library/qmakeparser.cpp
+++ b/qmake/library/qmakeparser.cpp
@@ -701,8 +701,9 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
} else if (c == '}') {
FLUSH_LHS_LITERAL();
finalizeCond(tokPtr, buf, ptr, wordCount);
- flushScopes(tokPtr);
+ m_state = StNew; // De-facto newline
closeScope:
+ flushScopes(tokPtr);
if (!m_blockstack.top().braceLevel) {
parseError(fL1S("Excess closing brace."));
} else if (!--m_blockstack.top().braceLevel