Changeset 651 for trunk/tools/linguist/shared/translator.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/tools/linguist/shared/translator.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 45 45 46 46 #include <stdio.h> 47 #ifdef Q_OS_WIN 48 #include <io.h> // required for _setmode, to avoid _O_TEXT streams... 49 #include <fcntl.h> // for _O_BINARY 50 #endif 47 51 48 52 #include <QtCore/QDebug> … … 208 212 QFile file; 209 213 if (filename.isEmpty() || filename == QLatin1String("-")) { 214 #ifdef Q_OS_WIN 215 // QFile is broken for text files 216 ::_setmode(0, _O_BINARY); 217 #endif 210 218 if (!file.open(stdin, QIODevice::ReadOnly)) { 211 219 cd.appendError(QString::fromLatin1("Cannot open stdin!? (%1)") … … 244 252 QFile file; 245 253 if (filename.isEmpty() || filename == QLatin1String("-")) { 254 #ifdef Q_OS_WIN 255 // QFile is broken for text files 256 ::_setmode(1, _O_BINARY); 257 #endif 246 258 if (!file.open(stdout, QIODevice::WriteOnly)) { 247 259 cd.appendError(QString::fromLatin1("Cannot open stdout!? (%1)")
Note:
See TracChangeset
for help on using the changeset viewer.