summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-05 09:52:11 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-07 14:46:18 (GMT)
commit4337d695410301b97b753231c3b8fc9560a9d4c7 (patch)
tree3280574ee2de859f44b78e79a1e63a6c355b3387 /tools/linguist
parent495dfda1bea31017d08a435dcb61b43b4df81d24 (diff)
downloadQt-4337d695410301b97b753231c3b8fc9560a9d4c7.zip
Qt-4337d695410301b97b753231c3b8fc9560a9d4c7.tar.gz
Qt-4337d695410301b97b753231c3b8fc9560a9d4c7.tar.bz2
immediately set function context when entering a namespace
otherwise, tr() calls without absolute qualification will not be properly qualified inside the first function if it has no qualification, either. Task-number: QTBUG-11742 (not really)
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lupdate/cpp.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index 609bd3d..bc9bb26 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -1686,9 +1686,14 @@ 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);
- yyTok = getToken();
+
+ functionContext = namespaces;
+ functionContextUnresolved.clear();
+ prospectiveContext.clear();
+ pendingContext.clear();
} else if (yyTok == Tok_Equals) {
// e.g. namespace Is = OuterSpace::InnerSpace;
QList<HashString> fullName;