--- a/tools/linguist/lupdate/main.cpp Tue Jan 26 12:42:25 2010 +0200
+++ b/tools/linguist/lupdate/main.cpp Tue Feb 02 00:43:10 2010 +0200
@@ -54,11 +54,18 @@
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
+#include <iostream>
+
static QString m_defaultExtensions;
+static void printErr(const QString & out)
+{
+ qWarning("%s", qPrintable(out));
+}
+
static void printOut(const QString & out)
{
- qWarning("%s", qPrintable(out));
+ std::cerr << qPrintable(out);
}
static void recursiveFileInfoList(const QDir &dir,
@@ -137,7 +144,7 @@
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 @@
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;
}
}
@@ -494,6 +501,7 @@
if (!tmp.isEmpty() && !tmp.first().isEmpty()) {
codecForTr = tmp.first().toLatin1();
fetchedTor.setCodecName(codecForTr);
+ cd.m_outputCodec = codecForTr;
}
tmp = variables.value("CODECFORSRC");
if (!tmp.isEmpty() && !tmp.first().isEmpty()) {