summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-06-23 05:31:21 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-06-23 05:34:41 (GMT)
commite53cd1a6c32e2de719e82a1e0f25b104a0fee995 (patch)
tree23739e5b9a2213e769973c365df7737d84a3d476 /tools/linguist
parent30b56f103e9fa868a4c3aa051555fd333626ee0a (diff)
downloadQt-e53cd1a6c32e2de719e82a1e0f25b104a0fee995.zip
Qt-e53cd1a6c32e2de719e82a1e0f25b104a0fee995.tar.gz
Qt-e53cd1a6c32e2de719e82a1e0f25b104a0fee995.tar.bz2
Support for non-literal plural arguments to qsTr() in lupdate (QML).
Task-number: QTBUG-11579
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lupdate/qdeclarative.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/tools/linguist/lupdate/qdeclarative.cpp b/tools/linguist/lupdate/qdeclarative.cpp
index a734e99..1b35c14 100644
--- a/tools/linguist/lupdate/qdeclarative.cpp
+++ b/tools/linguist/lupdate/qdeclarative.cpp
@@ -102,12 +102,8 @@ protected:
comment = literal->value->asString();
AST::ArgumentList *nNode = commentNode->next;
- if (nNode) {
- AST::NumericLiteral *numLiteral = AST::cast<AST::NumericLiteral *>(nNode->expression);
- if (numLiteral) {
- plural = true;
- }
- }
+ if (nNode)
+ plural = true;
}
TranslatorMessage msg(m_component, source,
@@ -135,12 +131,8 @@ protected:
comment = literal->value->asString();
AST::ArgumentList *nNode = commentNode->next;
- if (nNode) {
- AST::NumericLiteral *numLiteral = AST::cast<AST::NumericLiteral *>(nNode->expression);
- if (numLiteral) {
- plural = true;
- }
- }
+ if (nNode)
+ plural = true;
}
}