diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-23 13:07:40 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-23 13:07:40 (GMT) |
commit | f54e239174cea9ce54acd8fd7e6360a663bcfcae (patch) | |
tree | 9b1016cde186982a757a3764167bd1d509d2b281 /tools/linguist/lupdate/main.cpp | |
parent | 772dffde89f33d7738207a32455b8b7c81e73551 (diff) | |
parent | c7f14f778b3e974631d29cb1ad87891f6b350f61 (diff) | |
download | Qt-f54e239174cea9ce54acd8fd7e6360a663bcfcae.zip Qt-f54e239174cea9ce54acd8fd7e6360a663bcfcae.tar.gz Qt-f54e239174cea9ce54acd8fd7e6360a663bcfcae.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
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()) { |