From bd768552c08d953fea6cc82d48315f52bd6329af Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 4 Jul 2023 20:10:08 +0800 Subject: [PATCH] - fix: Inherited class/struct members are not correctly shown in the completion suggestions. --- NEWS.md | 1 + RedPandaIDE/parser/cppparser.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 54d0931e..063ba764 100644 --- a/NEWS.md +++ b/NEWS.md @@ -26,6 +26,7 @@ Red Panda C++ Version 2.23 - fix: Replace panel should be hidden after finding occurrencies. - enhancement: Show code completion suggestion after "typedef" and "const". - fix: GLFW project template. + - fix: Inherited class/struct members are not correctly shown in the completion suggestions. Red Panda C++ Version 2.22 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index fdbaed6e..94e32180 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -1263,7 +1263,7 @@ PStatement CppParser::addInheritedStatement(const PStatement& derived, const PSt inherit->kind, inherit->scope, access, - inherit->properties & StatementProperty::spInherited); + inherit->properties | StatementProperty::spInherited); return statement; } @@ -1386,6 +1386,9 @@ PStatement CppParser::addStatement(const PStatement& parent, fileIncludes->statements.insert(result->fullName,result); } } +// if (result->command=="sync_with_stdio") { +// qDebug()<fullName<isStatic()<<(int)result->accessibility; +// } return result; }