summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2015-10-26 14:19:23 +0100
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-04-08 19:15:26 +0000
commit53d5811b0c432b845e453dfbef3f4237a1a71877 (patch)
tree004144f0fb099db22717c3af0497a12b68696ab8 /src/tools
parentb77ef8a7e6e4104067d52824e29eadc8c66f5929 (diff)
rcc compiler with -list on Windows (newline symbols)
Suppress '\n' -> '\r\n' replacement done by QIODevice, on Windows fwrite to stdout will end up in such replacement, no need in \r\r\n (reported as a bug in QtQuickCompiler originally).) Task-number: QTRD-3497 Change-Id: I61010831b49e41b3e4fa6626054f9fb53c63bb8a Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/rcc/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp
index d8d5728414..30975cc17e 100644
--- a/src/tools/rcc/main.cpp
+++ b/src/tools/rcc/main.cpp
@@ -255,6 +255,11 @@ int runRcc(int argc, char *argv[])
// Make sure fwrite to stdout doesn't do LF->CRLF
if (library.format() == RCCResourceLibrary::Binary)
_setmode(_fileno(stdout), _O_BINARY);
+ // Make sure QIODevice does not do LF->CRLF,
+ // otherwise we'll end up in CRCRLF instead of
+ // CRLF.
+ if (list)
+ mode &= ~QIODevice::Text;
#endif // Q_OS_WIN
// using this overload close() only flushes.
out.open(stdout, mode);