diff options
Diffstat (limited to 'tools/linguist/shared/translator.cpp')
-rw-r--r-- | tools/linguist/shared/translator.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp index c86a9dd..8223dc6 100644 --- a/tools/linguist/shared/translator.cpp +++ b/tools/linguist/shared/translator.cpp @@ -43,6 +43,8 @@ #include "simtexth.h" +#include <iostream> + #include <stdio.h> #ifdef Q_OS_WIN // required for _setmode, to avoid _O_TEXT streams... @@ -586,22 +588,21 @@ void Translator::reportDuplicates(const Duplicates &dupes, const QString &fileName, bool verbose) { if (!dupes.byId.isEmpty() || !dupes.byContents.isEmpty()) { + std::cerr << "Warning: dropping duplicate messages in '" << qPrintable(fileName); if (!verbose) { - qWarning("Warning: dropping duplicate messages in '%s'\n(try -verbose for more info).", - qPrintable(fileName)); + std::cerr << "'\n(try -verbose for more info).\n"; } else { - qWarning("Warning: dropping duplicate messages in '%s':", qPrintable(fileName)); + std::cerr << "':\n"; foreach (int i, dupes.byId) - qWarning("\n* ID: %s", qPrintable(message(i).id())); + std::cerr << "\n* ID: " << qPrintable(message(i).id()) << std::endl; foreach (int j, dupes.byContents) { const TranslatorMessage &msg = message(j); - qWarning("\n* Context: %s\n* Source: %s", - qPrintable(msg.context()), - qPrintable(msg.sourceText())); + std::cerr << "\n* Context: " << qPrintable(msg.context()) + << "\n* Source: " << qPrintable(msg.sourceText()) << std::endl; if (!msg.comment().isEmpty()) - qWarning("* Comment: %s", qPrintable(msg.comment())); + std::cerr << "* Comment: " << qPrintable(msg.comment()) << std::endl; } - qWarning(); + std::cerr << std::endl; } } } @@ -737,7 +738,7 @@ void Translator::setCodecName(const QByteArray &name) QTextCodec *codec = QTextCodec::codecForName(name); if (!codec) { if (!name.isEmpty()) - qWarning("No QTextCodec for %s available. Using Latin1\n", name.constData()); + std::cerr << "No QTextCodec for " << name.constData() << " available. Using Latin1.\n"; m_codec = QTextCodec::codecForName("ISO-8859-1"); } else { m_codec = codec; |