summaryrefslogtreecommitdiffstats
path: root/src/linguist/lupdate/qdeclarative.cpp
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@theqtcompany.com>2015-03-10 13:29:51 +0100
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2015-03-11 11:29:19 +0000
commit0b356c32ab517bad0e7801ceab1ea9d99a9d259e (patch)
tree4b5030c9fc52260a6e43344c4fb5d869dffb7d18 /src/linguist/lupdate/qdeclarative.cpp
parentce105c568a573917f9c29410d37c8fda5f46cc9b (diff)
lupdate: Remove wrong error messagev5.5.0-alpha1
For qsTr(), when string is not literal we printed a warning saying "text to translate must be a literal string". This was not correct, as it has never been a requirement for the string to be a _literal_ string. The solution is to remove the message entirely. Task-number: QTBUG-42381 Change-Id: If08726143c810382feb0a1c5db5036d9601ce488 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/linguist/lupdate/qdeclarative.cpp')
-rw-r--r--src/linguist/lupdate/qdeclarative.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/linguist/lupdate/qdeclarative.cpp b/src/linguist/lupdate/qdeclarative.cpp
index 24fab7435..ef5704ef9 100644
--- a/src/linguist/lupdate/qdeclarative.cpp
+++ b/src/linguist/lupdate/qdeclarative.cpp
@@ -109,10 +109,8 @@ protected:
}
QString source;
- if (!createString(node->arguments->expression, &source)) {
- yyMsg(identLineNo) << qPrintable(LU::tr("%1(): text to translate must be a literal string.\n").arg(name));
+ if (!createString(node->arguments->expression, &source))
return;
- }
QString comment;
bool plural = false;
@@ -145,18 +143,14 @@ protected:
}
QString context;
- if (!createString(node->arguments->expression, &context)) {
- yyMsg(identLineNo) << qPrintable(LU::tr("%1(): both arguments must be literal strings.\n").arg(name));
+ if (!createString(node->arguments->expression, &context))
return;
- }
AST::ArgumentList *sourceNode = node->arguments->next; // we know that it is a valid pointer.
QString source;
- if (!createString(sourceNode->expression, &source)) {
- yyMsg(identLineNo) << qPrintable(LU::tr("%1(): both arguments must be literal strings.\n").arg(name));
+ if (!createString(sourceNode->expression, &source))
return;
- }
if (!sourcetext.isEmpty())
yyMsg(identLineNo) << qPrintable(LU::tr("//% cannot be used with %1(). Ignoring\n").arg(name));
@@ -190,10 +184,8 @@ protected:
}
QString id;
- if (!createString(node->arguments->expression, &id)) {
- yyMsg(identLineNo) << qPrintable(LU::tr("%1(): identifier must be a literal string.\n").arg(name));
+ if (!createString(node->arguments->expression, &id))
return;
- }
if (!msgid.isEmpty()) {
yyMsg(identLineNo) << qPrintable(LU::tr("//= cannot be used with %1(). Ignoring\n").arg(name));