From cda5742493b48c53ae2255a01759a72026d2aeaf Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 10 Apr 2010 10:19:16 +0200 Subject: Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too. Ossi is right: on WinCE, _setmode is different from regular Windows and the docs... Reviewed-by: ossi --- tools/linguist/shared/translator.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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)") -- cgit v0.12