diff --git a/NEWS.md b/NEWS.md index 582a7439..02063a41 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,6 +13,7 @@ Red Panda C++ Version 2.11 - fix: Correctly handle files whose name contains spaces in the generated makefile. - fix: Correctly handle custom obj folder in the generated makefile. - enhancement: Support compile asm files using nasm in the project. + - fix: Project parser should not parse non-c/cpp files. Red Panda C++ Version 2.10 diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index ade981a2..29ee4f15 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -587,7 +587,9 @@ void Project::resetParserProjectFiles() mParser->clearProjectFiles(); mParser->clearProjectIncludePaths(); foreach (const PProjectUnit& unit, mUnits) { - mParser->addProjectFile(unit->fileName(),true); + if (isCFile(unit->fileName()) + || isHFile(unit->fileName())) + mParser->addProjectFile(unit->fileName(),true); } foreach (const QString& s, mOptions.includeDirs) { mParser->addProjectIncludePath(s);