diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp index 96698d4845..4d389b9492 100644 --- a/qmake/library/qmakeparser.cpp +++ b/qmake/library/qmakeparser.cpp @@ -908,14 +908,19 @@ void QMakeParser::flushCond(ushort *&tokPtr) } } -void QMakeParser::finalizeTest(ushort *&tokPtr) +void QMakeParser::putOperator(ushort *&tokPtr) { - flushScopes(tokPtr); - putLineMarker(tokPtr); if (m_operator != NoOperator) { putTok(tokPtr, (m_operator == AndOperator) ? TokAnd : TokOr); m_operator = NoOperator; } +} + +void QMakeParser::finalizeTest(ushort *&tokPtr) +{ + flushScopes(tokPtr); + putLineMarker(tokPtr); + putOperator(tokPtr); if (m_invert) { putTok(tokPtr, TokNot); m_invert = false; @@ -1059,10 +1064,7 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg if (*uce == (TokLiteral|TokNewStr)) { uint nlen = uce[1]; if (uce[nlen + 2] == TokFuncTerminator) { - if (m_operator != NoOperator) { - putTok(tokPtr, (m_operator == AndOperator) ? TokAnd : TokOr); - m_operator = NoOperator; - } + putOperator(tokPtr); putTok(tokPtr, defType); putHashStr(tokPtr, uce + 2, nlen); enterScope(tokPtr, true, StCtrl); diff --git a/qmake/library/qmakeparser.h b/qmake/library/qmakeparser.h index 448f518f75..09f8d1b7a7 100644 --- a/qmake/library/qmakeparser.h +++ b/qmake/library/qmakeparser.h @@ -144,6 +144,7 @@ private: const ushort *cur, const QString &in); void finalizeCond(ushort *&tokPtr, ushort *uc, ushort *ptr, int wordCount); void finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int argc); + void putOperator(ushort *&tokPtr); void finalizeTest(ushort *&tokPtr); void bogusTest(ushort *&tokPtr, const QString &msg); void enterScope(ushort *&tokPtr, bool special, ScopeState state);