diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-02-26 11:55:15 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-02-28 09:00:32 +0000 |
commit | 077e4993046ee5e564dfcc7710d07c905f2dee83 (patch) | |
tree | 1e5f2aba4d707e40a4bd6c1f6ead9cf36e34f4b5 /qmake/generators/makefile.cpp | |
parent | f657c7426329d3763bbf3373b986378c22020269 (diff) |
Handle QMAKE_SUBSTITUTES input files as Latin 1
QMake's strategy is generally "pretend everything is Latin 1", which
basically equals "do 8-bit pass-through". Change the handling of
QMAKE_SUBSTITUTES input accordingly to avoid conversion losses when
converting from and to UTF-8.
Fixes: QTBUG-72130
Change-Id: Id903bbd2afa99708c92fd09fab3db944aa819a94
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7762e47f41..ab261d02f1 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -532,7 +532,7 @@ MakefileGenerator::init() QStack<int> state; enum { IN_CONDITION, MET_CONDITION, PENDING_CONDITION }; for (int count = 1; !in.atEnd(); ++count) { - QString line = QString::fromUtf8(in.readLine()); + QString line = QString::fromLatin1(in.readLine()); if (line.startsWith("!!IF ")) { if (state.isEmpty() || state.top() == IN_CONDITION) { QString test = line.mid(5, line.length()-(5+1)); @@ -578,7 +578,7 @@ MakefileGenerator::init() contents += project->expand(line, in.fileName(), count); } } - contentBytes = contents.toUtf8(); + contentBytes = contents.toLatin1(); } QFile out(outn); QFileInfo outfi(out); |