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);