summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-10 07:34:43 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-10 14:31:25 (GMT)
commitf7db9a602a83b05ccad6ac33a2ab63acf3367481 (patch)
treefaec051e25a7d2f357e034f672f7549839fa493c /tools
parentc2d6eb9dca7546bbe8d9c6c62db683615e4b23a7 (diff)
downloadQt-f7db9a602a83b05ccad6ac33a2ab63acf3367481.zip
Qt-f7db9a602a83b05ccad6ac33a2ab63acf3367481.tar.gz
Qt-f7db9a602a83b05ccad6ac33a2ab63acf3367481.tar.bz2
delay next token fetching when opening namespace
otherwise, if the next token to be fetched is a non-empty #define, it would save the context before entering the namespace, and thus the post-define context restore would just discard the namespace entry. Task-number: QTBUG-12683
Diffstat (limited to 'tools')
-rw-r--r--tools/linguist/lupdate/cpp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 009d5a7..d701d7f 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -1704,7 +1704,6 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
HashString ns = HashString(text);
yyTok = getToken();
if (yyTok == Tok_LeftBrace) {
- yyTok = getToken();
namespaceDepths.push(namespaces.count());
enterNamespace(&namespaces, ns);
@@ -1712,6 +1711,7 @@ void CppParser::parseInternal(ConversionData &cd, QSet<QString> &inclusions)
functionContextUnresolved.clear();
prospectiveContext.clear();
pendingContext.clear();
+ yyTok = getToken();
} else if (yyTok == Tok_Equals) {
// e.g. namespace Is = OuterSpace::InnerSpace;
QList<HashString> fullName;