diff --git a/RedPandaIDE/parser/cpppreprocessor.cpp b/RedPandaIDE/parser/cpppreprocessor.cpp index 2bd619bc..abf3bf55 100644 --- a/RedPandaIDE/parser/cpppreprocessor.cpp +++ b/RedPandaIDE/parser/cpppreprocessor.cpp @@ -778,11 +778,11 @@ void CppPreprocessor::openInclude(QString fileName) if (parsedFile->fileInfo->including(fileName)) { alreadyIncluded = true; } - parsedFile->fileInfo->include(fileName); + parsedFile->fileInfo->addInclude(fileName); } PParsedFile innerMostFile = mIncludes.back(); - innerMostFile->fileInfo->include(fileName); - innerMostFile->fileInfo->directInclude(fileName); + innerMostFile->fileInfo->addInclude(fileName); + innerMostFile->fileInfo->addDirectInclude(fileName); if (alreadyIncluded) return; // Backup old position if we're entering a new file @@ -831,7 +831,7 @@ void CppPreprocessor::openInclude(QString fileName) if (fileInfo) { for (PParsedFile& file:mIncludes) { foreach (const QString& incFile,fileInfo->includes()) { - file->fileInfo->include(incFile); + file->fileInfo->addInclude(incFile); } } } diff --git a/RedPandaIDE/parser/parserutils.cpp b/RedPandaIDE/parser/parserutils.cpp index 17657eeb..b94b6a21 100644 --- a/RedPandaIDE/parser/parserutils.cpp +++ b/RedPandaIDE/parser/parserutils.cpp @@ -790,7 +790,7 @@ bool ParsedFileInfo::isLineVisible(int line) const return lastI<0?true:mBranches[lastI]; } -void ParsedFileInfo::include(const QString &fileName) +void ParsedFileInfo::addInclude(const QString &fileName) { int count = mIncludeCounts.value(fileName,0); count++; @@ -798,7 +798,7 @@ void ParsedFileInfo::include(const QString &fileName) mIncludes.insert(fileName); } -void ParsedFileInfo::uninclude(const QString &fileName) +void ParsedFileInfo::removeInclude(const QString &fileName) { int count = mIncludeCounts.value(fileName,0); count--; @@ -809,7 +809,7 @@ void ParsedFileInfo::uninclude(const QString &fileName) mIncludeCounts.insert(fileName,count); } -void ParsedFileInfo::directInclude(const QString &fileName) +void ParsedFileInfo::addDirectInclude(const QString &fileName) { mDirectIncludes.append(fileName); } diff --git a/RedPandaIDE/parser/parserutils.h b/RedPandaIDE/parser/parserutils.h index 7693f7a4..58455725 100644 --- a/RedPandaIDE/parser/parserutils.h +++ b/RedPandaIDE/parser/parserutils.h @@ -324,9 +324,9 @@ public: ParsedFileInfo& operator=(const ParsedFileInfo&)=delete; void insertBranch(int level, bool branchTrue); bool isLineVisible(int line) const; - void include(const QString &fileName); - void uninclude(const QString &fileName); - void directInclude(const QString &fileName); + void addInclude(const QString &fileName); + void removeInclude(const QString &fileName); + void addDirectInclude(const QString &fileName); bool including(const QString &fileName) const; PStatement findScopeAtLine(int line) const; void addStatement(const PStatement &statement);