summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-10 08:19:16 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-10 08:22:17 (GMT)
commitcda5742493b48c53ae2255a01759a72026d2aeaf (patch)
tree54b82aa2eb1c8b8367751d74ad8811e82c43a9fb /tools
parentb31da7012a6f675b69e1ef8d6f5aec612337a2ea (diff)
downloadQt-cda5742493b48c53ae2255a01759a72026d2aeaf.zip
Qt-cda5742493b48c53ae2255a01759a72026d2aeaf.tar.gz
Qt-cda5742493b48c53ae2255a01759a72026d2aeaf.tar.bz2
Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too.
Ossi is right: on WinCE, _setmode is different from regular Windows and the docs... Reviewed-by: ossi
Diffstat (limited to 'tools')
-rw-r--r--tools/linguist/shared/translator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index 826004e..c86a9dd 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -262,7 +262,11 @@ bool Translator::save(const QString &filename, ConversionData &cd, const QString
if (filename.isEmpty() || filename == QLatin1String("-")) {
#ifdef Q_OS_WIN
// QFile is broken for text files
+# ifdef Q_OS_WINCE
+ ::_setmode(stdout, _O_BINARY);
+# else
::_setmode(1, _O_BINARY);
+# endif
#endif
if (!file.open(stdout, QIODevice::WriteOnly)) {
cd.appendError(QString::fromLatin1("Cannot open stdout!? (%1)")