diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2019-11-29 18:13:01 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2019-12-05 13:34:18 +0100 |
commit | 83df5c71e6bdb13569202ba84572fd2c309d63d2 (patch) | |
tree | bd1a083878f16389786335ee7237430e0a5e09de /qmake | |
parent | 92cf38018afe8f598f2c337c0d202f3767b04ead (diff) |
Fix qmake's sed functionality for input containing CR+LF newlines
QTextStream, reading a file with CR+LF newlines from an stdio FILE
handle that was opened without "b", will always return false in atEnd().
Changing the open mode from "r" to "rb" works around the issue.
Task-number: QTBUG-80443
Change-Id: Ib2eafc0c4c6a6d2bcaeea3036474549d2d9e1511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/main.cpp b/qmake/main.cpp index dd1cca9633..86f91031df 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -154,7 +154,7 @@ static int doSed(int argc, char **argv) FILE *f; if (!strcmp(inFile, "-")) { f = stdin; - } else if (!(f = fopen(inFile, "r"))) { + } else if (!(f = fopen(inFile, "rb"))) { perror(inFile); return 1; } |