Use native line endings when saving .ts files on Windows
lupdate opens .ts files with QIODevice::WriteOnly (binary mode),
so QTextStream always writes LF regardless of platform. On Windows,
this means new .ts files get Unix line endings, and existing CRLF
files lose their line endings, triggering git warnings on every run.
Detect whether the file uses CRLF (or is new/unreadable) and open
with QIODevice::Text so QTextStream translates \n to \r\n. Existing
LF-only files are left as-is.
Change-Id: I0fd60de1bf2e9bd5f31100447990b1b08c5e05d5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Masoud Jami <masoud.jami@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>