diff options
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/project.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index 9716237f90..3df80bc00d 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1239,8 +1239,14 @@ QMakeProject::read(const QString &file, QHash<QString, QStringList> &place) parser.from_file = true; parser.file = filename; parser.line_no = 0; - QTextStream t(&qfile); - ret = read(t, place); + if (qfile.peek(3) == QByteArray("\xef\xbb\xbf")) { + //UTF-8 BOM will cause subtle errors + qmake_error_msg("Unexpected UTF-8 BOM found"); + ret = false; + } else { + QTextStream t(&qfile); + ret = read(t, place); + } if(!using_stdin) qfile.close(); } |