C++: Normalize line ending for preprocessing

There is logic in the preprocessor that assumes a normalized line
ending. Other patches have already fixed the issue in other parts.

Change-Id: Iac262da361b6528cc9466a6c87e83da95af9ea04
Reviewed-on: http://codereview.qt.nokia.com/4252
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
Leandro Melo
2011-09-06 11:28:47 +02:00
committed by Leandro T. C. Melo
parent a2e9fadb61
commit b237464045

View File

@@ -332,7 +332,7 @@ bool CppPreprocessor::includeFile(const QString &absoluteFilePath, QString *resu
return false;
QFile file(absoluteFilePath);
if (file.open(QFile::ReadOnly)) {
if (file.open(QFile::ReadOnly | QFile::Text)) {
m_included.insert(absoluteFilePath);
QTextStream stream(&file);
const QString contents = stream.readAll();