summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lupdate
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/lupdate
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/lupdate')
-rw-r--r--tools/linguist/lupdate/main.cpp15
1 files changed, 11 insertions, 4 deletions
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;
}
}