summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lupdate/qscript.g
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist/lupdate/qscript.g')
-rw-r--r--tools/linguist/lupdate/qscript.g22
1 files changed, 12 insertions, 10 deletions
diff --git a/tools/linguist/lupdate/qscript.g b/tools/linguist/lupdate/qscript.g
index a473500..a07753c 100644
--- a/tools/linguist/lupdate/qscript.g
+++ b/tools/linguist/lupdate/qscript.g
@@ -90,6 +90,8 @@
#include <QtCore/qtextcodec.h>
#include <QtCore/qvariant.h>
+#include <iostream>
+
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
@@ -1630,13 +1632,13 @@ case $rule_number: {
if ((name == QLatin1String("qsTranslate")) || (name == QLatin1String("QT_TRANSLATE_NOOP"))) {
QVariantList args = sym(2).toList();
if (args.size() < 2) {
- qWarning("%s:%d: %s() requires at least two arguments",
- qPrintable(fileName), identLineNo, qPrintable(name));
+ std::cerr << qPrintable(fileName) << ':' << identLineNo << ": "
+ << qPrintable(name) << "() requires at least two arguments.\n";
} else {
if ((args.at(0).type() != QVariant::String)
|| (args.at(1).type() != QVariant::String)) {
- qWarning("%s:%d: %s(): both arguments must be literal strings",
- qPrintable(fileName), identLineNo, qPrintable(name));
+ std::cerr << qPrintable(fileName) << ':' << identLineNo << ": "
+ << qPrintable(name) << "(): both arguments must be literal strings.\n";
} else {
QString context = args.at(0).toString();
QString text = args.at(1).toString();
@@ -1650,12 +1652,12 @@ case $rule_number: {
} else if ((name == QLatin1String("qsTr")) || (name == QLatin1String("QT_TR_NOOP"))) {
QVariantList args = sym(2).toList();
if (args.size() < 1) {
- qWarning("%s:%d: %s() requires at least one argument",
- qPrintable(fileName), identLineNo, qPrintable(name));
+ std::cerr << qPrintable(fileName) << ':' << identLineNo << ": "
+ << qPrintable(name) << "() requires at least one argument.\n";
} else {
if (args.at(0).type() != QVariant::String) {
- qWarning("%s:%d: %s(): text to translate must be a literal string",
- qPrintable(fileName), identLineNo, qPrintable(name));
+ std::cerr << qPrintable(fileName) << ':' << identLineNo << ": "
+ << qPrintable(name) << "(): text to translate must be a literal string.\n";
} else {
QString context = QFileInfo(fileName).baseName();
QString text = args.at(0).toString();
@@ -2009,8 +2011,8 @@ bool loadQScript(Translator &translator, const QString &filename, ConversionData
lexer.setCode(code, /*lineNumber=*/1);
QScriptParser parser;
if (!parser.parse(&lexer, filename, &translator)) {
- qWarning("%s:%d: %s", qPrintable(filename), parser.errorLineNumber(),
- qPrintable(parser.errorMessage()));
+ std::cerr << qPrintable(filename) << ':' << parser.errorLineNumber() << ": "
+ << qPrintable(parser.errorMessage()) << std::endl;
return false;
}