summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-18 23:48:09 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-18 23:48:09 (GMT)
commit954f1288e40f5fe2997c3caa66cb2f4ba9d710b3 (patch)
treee4407b6db1140e7970fa7db7544a3939c56b775b /tools/linguist
parent3769beacd9126b567f6a42e6c357a7eda004a602 (diff)
downloadQt-954f1288e40f5fe2997c3caa66cb2f4ba9d710b3.zip
Qt-954f1288e40f5fe2997c3caa66cb2f4ba9d710b3.tar.gz
Qt-954f1288e40f5fe2997c3caa66cb2f4ba9d710b3.tar.bz2
Various fixes for Qml support in lupdate.
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lupdate/main.cpp3
-rw-r--r--tools/linguist/lupdate/qml.cpp14
2 files changed, 9 insertions, 8 deletions
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index 8597672..f47844f 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -428,7 +428,8 @@ int main(int argc, char **argv)
if (!fn.endsWith(QLatin1String(".java"))
&& !fn.endsWith(QLatin1String(".ui"))
&& !fn.endsWith(QLatin1String(".js"))
- && !fn.endsWith(QLatin1String(".qs"))) {
+ && !fn.endsWith(QLatin1String(".qs"))
+ && !fn.endsWith(QLatin1String(".qml"))) {
int offset = 0;
int depth = 0;
do {
diff --git a/tools/linguist/lupdate/qml.cpp b/tools/linguist/lupdate/qml.cpp
index 8c3f1c5..6eec72e 100644
--- a/tools/linguist/lupdate/qml.cpp
+++ b/tools/linguist/lupdate/qml.cpp
@@ -94,18 +94,18 @@ protected:
const QString source = literal->value->asString();
QString comment;
+ bool plural = false;
AST::ArgumentList *commentNode = node->arguments->next;
if (commentNode) {
literal = AST::cast<AST::StringLiteral *>(commentNode->expression);
comment = literal->value->asString();
- }
- bool plural = false;
- AST::ArgumentList *nNode = commentNode->next;
- if (nNode) {
- AST::NumericLiteral *literal3 = AST::cast<AST::NumericLiteral *>(nNode->expression);
- if (literal3) {
- plural = true;
+ AST::ArgumentList *nNode = commentNode->next;
+ if (nNode) {
+ AST::NumericLiteral *literal3 = AST::cast<AST::NumericLiteral *>(nNode->expression);
+ if (literal3) {
+ plural = true;
+ }
}
}