diff options
author | Lucie Gerard <lucie.gerard@qt.io> | 2019-04-01 10:11:32 +0200 |
---|---|---|
committer | Lucie Gerard <lucie.gerard@qt.io> | 2019-04-02 09:49:33 +0000 |
commit | ebda25ecb40aa1a13920a534bf2c6449981b92fe (patch) | |
tree | c2d4c23cdb7e6037c9390abe78f91fdd6336115e | |
parent | 9364c3fcc8c98f70aceaac5b72823e290504cb2a (diff) | |
download | qttools-ebda25ecb40aa1a13920a534bf2c6449981b92fe.tar.gz |
Convert \r into a numerical entity
Task-number: QTBUG-41562
Change-Id: If03df28095212f2ee9f74eeaf03c50a6f1203415
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r-- | src/linguist/shared/ts.cpp | 2 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/linguist/shared/ts.cpp b/src/linguist/shared/ts.cpp index 5914319c9..153f9708b 100644 --- a/src/linguist/shared/ts.cpp +++ b/src/linguist/shared/ts.cpp @@ -464,7 +464,7 @@ static QString protect(const QString &str) result += QLatin1String("'"); break; default: - if ((c < 0x20 || (ch > 0x7f && ch.isSpace())) && c != '\r' && c != '\n' && c != '\t') + if ((c < 0x20 || (ch > 0x7f && ch.isSpace())) && c != '\n' && c != '\t') result += numericEntity(c); else // this also covers surrogates result += QChar(c); diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result index 93bd54bb9..486abcec4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result @@ -62,9 +62,9 @@ NEWLINE AT THE START</translation> </message> <message> <location filename="main.cpp" line="49"/> - <source>carriage return and line feed last + <source>carriage return and line feed last<byte value="xd"/> </source> - <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST + <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST<byte value="xd"/> </translation> </message> </context> |