summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-20 20:32:15 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-20 20:32:15 (GMT)
commitaae4b037317a9ad0d41022d6309f1d4f36443764 (patch)
tree2f0c1f587a1fafce12e253e12b4168f831967c3f /tools/linguist
parent7367a12c4a0d7686b9d35778e5de33a463504d75 (diff)
downloadQt-aae4b037317a9ad0d41022d6309f1d4f36443764.zip
Qt-aae4b037317a9ad0d41022d6309f1d4f36443764.tar.gz
Qt-aae4b037317a9ad0d41022d6309f1d4f36443764.tar.bz2
don't use qWarning for things which are not really warnings
... so the tools are usable with QT_FATAL_WARNINGS. it may be sensible to "degrade" the c++ parser warnings to info messages. possibly later ... Task-number: QTBUG-5683
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lconvert/main.cpp6
-rw-r--r--tools/linguist/lupdate/main.cpp15
2 files changed, 15 insertions, 6 deletions
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index 7807761..5f3de7b 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -46,6 +46,8 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
+#include <iostream>
+
static int usage(const QStringList &args)
{
Q_UNUSED(args);
@@ -55,7 +57,7 @@ static int usage(const QStringList &args)
foreach (Translator::FileFormat format, Translator::registeredFileFormats())
loaders += line.arg(format.extension, -5).arg(format.description);
- qWarning("%s", qPrintable(QString(QLatin1String("\nUsage:\n"
+ std::cerr << qPrintable(QString(QLatin1String("\nUsage:\n"
" lconvert [options] <infile> [<infile>...]\n\n"
"lconvert is part of Qt's Linguist tool chain. It can be used as a\n"
"stand-alone tool to convert and filter translation data files.\n"
@@ -117,7 +119,7 @@ static int usage(const QStringList &args)
" 0 on success\n"
" 1 on command line parse failures\n"
" 2 on read failures\n"
- " 3 on write failures\n")).arg(loaders)));
+ " 3 on write failures\n")).arg(loaders));
return 1;
}
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index 7defee0..9a9af68 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -54,13 +54,20 @@
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
+#include <iostream>
+
static QString m_defaultExtensions;
-static void printOut(const QString & out)
+static void printErr(const QString & out)
{
qWarning("%s", qPrintable(out));
}
+static void printOut(const QString & out)
+{
+ std::cerr << qPrintable(out);
+}
+
static void recursiveFileInfoList(const QDir &dir,
const QSet<QString> &nameFilters, QDir::Filters filter,
QFileInfoList *fileinfolist)
@@ -137,7 +144,7 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
cd.m_sortContexts = !(options & NoSort);
if (QFile(fileName).exists()) {
if (!tor.load(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
continue;
}
@@ -197,11 +204,11 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
out.normalizeTranslations(cd);
if (!cd.errors().isEmpty()) {
- printOut(cd.error());
+ printErr(cd.error());
cd.clearErrors();
}
if (!out.save(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
}
}