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>
This commit is contained in:
parent
f657c74263
commit
077e499304
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user