summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lupdate
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-22 04:41:04 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-22 04:41:04 (GMT)
commitba9caa7181282109ea8def0994838b6538da0b13 (patch)
treef1ae3f595fe6f601ce411d69179d6c0c8c650386 /tools/linguist/lupdate
parent2575eac4c26ad92dde95959a82f576edc3e76e1d (diff)
parentf9d26f0bebd5bcc32d15c4a627251c44cf78389e (diff)
downloadQt-ba9caa7181282109ea8def0994838b6538da0b13.zip
Qt-ba9caa7181282109ea8def0994838b6538da0b13.tar.gz
Qt-ba9caa7181282109ea8def0994838b6538da0b13.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: src/corelib/kernel/kernel.pri src/corelib/tools/tools.pri tools/qdoc3/htmlgenerator.cpp tools/qdoc3/htmlgenerator.h
Diffstat (limited to 'tools/linguist/lupdate')
-rw-r--r--tools/linguist/lupdate/java.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/linguist/lupdate/java.cpp b/tools/linguist/lupdate/java.cpp
index c8dbe5b..31024f9 100644
--- a/tools/linguist/lupdate/java.cpp
+++ b/tools/linguist/lupdate/java.cpp
@@ -60,7 +60,7 @@ enum { Tok_Eof, Tok_class, Tok_return, Tok_tr,
Tok_Comment, Tok_String, Tok_Colon, Tok_Dot,
Tok_LeftBrace, Tok_RightBrace, Tok_LeftParen,
Tok_RightParen, Tok_Comma, Tok_Semicolon,
- Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq };
+ Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq, Tok_null };
class Scope
{
@@ -144,7 +144,11 @@ static int getToken()
case 'c':
if ( yyIdent == QLatin1String("class") )
return Tok_class;
- break;
+ break;
+ case 'n':
+ if ( yyIdent == QLatin1String("null") )
+ return Tok_null;
+ break;
}
}
switch ( yyIdent.at(0).toLatin1() ) {
@@ -384,9 +388,11 @@ static bool matchInteger( qlonglong *number)
static bool matchStringOrNull(QString &s)
{
bool matches = matchString(s);
- qlonglong num = 0;
- if (!matches) matches = matchInteger(&num);
- return matches && num == 0;
+ if (!matches) {
+ matches = (yyTok == Tok_null);
+ if (matches) yyTok = getToken();
+ }
+ return matches;
}
/*