diff options
Diffstat (limited to 'tools/linguist/lupdate/main.cpp')
-rw-r--r-- | tools/linguist/lupdate/main.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index bdaec4f..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; } } @@ -494,6 +501,7 @@ int main(int argc, char **argv) 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()) { |