From b2374640457c4594d4d4b9a21d02be61921253eb Mon Sep 17 00:00:00 2001
From: Leandro Melo <leandro.melo@nokia.com>
Date: Tue, 6 Sep 2011 11:28:47 +0200
Subject: [PATCH] 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>
---
 src/plugins/cpptools/cppmodelmanager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 6856bc1f970..274d3e236a8 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -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();
-- 
GitLab