diff options
author | Geir Vattekar <geir.vattekar@nokia.com> | 2010-06-15 12:02:32 (GMT) |
---|---|---|
committer | Geir Vattekar <geir.vattekar@nokia.com> | 2010-06-15 12:02:32 (GMT) |
commit | ac3c3b3a19207328ffbcbdada10ef61291caba15 (patch) | |
tree | a33f216d62aa506448f7fb6cbdf7640f5f223fe0 /tools/linguist/lrelease/main.cpp | |
parent | c5b06919a8fb5d20aae41f0edf9e2ffa99eb1a8a (diff) | |
parent | a041e4eca3467c1baa6245b6fb47def127f30f41 (diff) | |
download | Qt-ac3c3b3a19207328ffbcbdada10ef61291caba15.zip Qt-ac3c3b3a19207328ffbcbdada10ef61291caba15.tar.gz Qt-ac3c3b3a19207328ffbcbdada10ef61291caba15.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tools/linguist/lrelease/main.cpp')
-rw-r--r-- | tools/linguist/lrelease/main.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp index 266474e..b5cff90 100644 --- a/tools/linguist/lrelease/main.cpp +++ b/tools/linguist/lrelease/main.cpp @@ -55,6 +55,8 @@ #include <QtCore/QStringList> #include <QtCore/QTextStream> +#include <iostream> + QT_USE_NAMESPACE #ifdef QT_BOOTSTRAPPED @@ -106,7 +108,7 @@ static bool loadTsFile(Translator &tor, const QString &tsFileName, bool /* verbo ConversionData cd; bool ok = tor.load(tsFileName, cd, QLatin1String("auto")); if (!ok) { - qWarning("lrelease error: %s\n", qPrintable(cd.error())); + std::cerr << "lrelease error: " << qPrintable(cd.error()); } else { if (!cd.errors().isEmpty()) printOut(cd.error()); @@ -130,8 +132,8 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName, QFile file(qmFileName); if (!file.open(QIODevice::WriteOnly)) { - qWarning("lrelease error: cannot create '%s': %s\n", - qPrintable(qmFileName), qPrintable(file.errorString())); + std::cerr << "lrelease error: cannot create '" << qPrintable(qmFileName) + << "': " << qPrintable(file.errorString()) << std::endl; return false; } @@ -140,8 +142,8 @@ static bool releaseTranslator(Translator &tor, const QString &qmFileName, file.close(); if (!ok) { - qWarning("lrelease error: cannot save '%s': %s\n", - qPrintable(qmFileName), qPrintable(cd.error())); + std::cerr << "lrelease error: cannot save '" << qPrintable(qmFileName) + << "': " << qPrintable(cd.error()); } else if (!cd.errors().isEmpty()) { printOut(cd.error()); } @@ -253,19 +255,20 @@ int main(int argc, char **argv) visitor.setVerbose(cd.isVerbose()); if (!visitor.queryProFile(&pro)) { - qWarning("lrelease error: cannot read project file '%s'.", qPrintable(inputFile)); + std::cerr << "lrelease error: cannot read project file '" + << qPrintable(inputFile) << "'.\n"; continue; } if (!visitor.accept(&pro)) { - qWarning("lrelease error: cannot process project file '%s'.", qPrintable(inputFile)); + std::cerr << "lrelease error: cannot process project file '" + << qPrintable(inputFile) << "'.\n"; continue; } QStringList translations = visitor.values(QLatin1String("TRANSLATIONS")); if (translations.isEmpty()) { - qWarning("lrelease warning: Met no 'TRANSLATIONS' entry in" - " project file '%s'\n", - qPrintable(inputFile)); + std::cerr << "lrelease warning: Met no 'TRANSLATIONS' entry in project file '" + << qPrintable(inputFile) << "'\n"; } else { QDir proDir(fi.absolutePath()); foreach (const QString &trans, translations) |