- fix: macro defines parsed before not correctly applied in the succeeding parse.
This commit is contained in:
parent
6fe1df8e6e
commit
4fad826899
1
NEWS.md
1
NEWS.md
|
@ -9,6 +9,7 @@ Red Panda C++ Version 2.4
|
||||||
- enhancement: Rename filenames in todos/bookmarks/breakpoints when renaming project file
|
- enhancement: Rename filenames in todos/bookmarks/breakpoints when renaming project file
|
||||||
- enhancement: Rename filenames in bookmarks/breakpoints after a file is save-ased.
|
- enhancement: Rename filenames in bookmarks/breakpoints after a file is save-ased.
|
||||||
- fix: Can't goto definition of classes and namespaces displayed in the class browser on whole project mode.
|
- fix: Can't goto definition of classes and namespaces displayed in the class browser on whole project mode.
|
||||||
|
- fix: macro defines parsed before not correctly applied in the succeeding parse.
|
||||||
|
|
||||||
Red Panda C++ Version 2.3
|
Red Panda C++ Version 2.3
|
||||||
|
|
||||||
|
|
|
@ -159,14 +159,6 @@ PDefine CppPreprocessor::getHardDefine(const QString &name)
|
||||||
return mHardDefines.value(name,PDefine());
|
return mHardDefines.value(name,PDefine());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPreprocessor::resetDefines()
|
|
||||||
{
|
|
||||||
mDefines = mHardDefines;
|
|
||||||
// mDefines.clear();
|
|
||||||
|
|
||||||
// mDefines.insert(mHardDefines);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CppPreprocessor::setScanOptions(bool parseSystem, bool parseLocal)
|
void CppPreprocessor::setScanOptions(bool parseSystem, bool parseLocal)
|
||||||
{
|
{
|
||||||
mParseSystem = parseSystem;
|
mParseSystem = parseSystem;
|
||||||
|
@ -846,6 +838,7 @@ void CppPreprocessor::addDefinesInFile(const QString &fileName)
|
||||||
return;
|
return;
|
||||||
mProcessed.insert(fileName);
|
mProcessed.insert(fileName);
|
||||||
|
|
||||||
|
qDebug()<<fileName;
|
||||||
// then add the defines defined in it
|
// then add the defines defined in it
|
||||||
PDefineMap defineList = mFileDefines.value(fileName, PDefineMap());
|
PDefineMap defineList = mFileDefines.value(fileName, PDefineMap());
|
||||||
if (defineList) {
|
if (defineList) {
|
||||||
|
@ -853,6 +846,11 @@ void CppPreprocessor::addDefinesInFile(const QString &fileName)
|
||||||
mDefines.insert(define->name,define);
|
mDefines.insert(define->name,define);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PFileIncludes fileIncludes = getFileIncludesEntry(fileName);
|
||||||
|
foreach (const QString& file, fileIncludes->includeFiles.keys()) {
|
||||||
|
addDefinesInFile(file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppPreprocessor::parseArgs(PDefine define)
|
void CppPreprocessor::parseArgs(PDefine define)
|
||||||
|
|
|
@ -121,7 +121,6 @@ private:
|
||||||
// include stuff
|
// include stuff
|
||||||
PFileIncludes getFileIncludesEntry(const QString& FileName);
|
PFileIncludes getFileIncludesEntry(const QString& FileName);
|
||||||
void addDefinesInFile(const QString& fileName);
|
void addDefinesInFile(const QString& fileName);
|
||||||
void resetDefines();
|
|
||||||
void addDefineByParts(const QString& name, const QString& args,
|
void addDefineByParts(const QString& name, const QString& args,
|
||||||
const QString& value, bool hardCoded);
|
const QString& value, bool hardCoded);
|
||||||
void addDefineByLine(const QString& line, bool hardCoded);
|
void addDefineByLine(const QString& line, bool hardCoded);
|
||||||
|
|
Loading…
Reference in New Issue