From 53d5811b0c432b845e453dfbef3f4237a1a71877 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 26 Oct 2015 14:19:23 +0100 Subject: 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 --- src/tools/rcc/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tools') 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); -- cgit v1.2.3