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();