diff --git a/NEWS.md b/NEWS.md index b8b354d9..e3120af3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ Red Panda C++ Version 0.13.4 - fix: when copy comments, don't auto indent - enhancement: auto add a new line when press enter between '/*' and '*/' - fix: code completion popup won't show members of 'this' + - fix: can't show private & protected members of 'this' + - fix: function name like 'A::B' is not correctly parsed Red Panda C++ Version 0.13.3 - enhancement: restore editor position after rename symbol diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index d8d7fa35..8b7ffebd 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -2162,7 +2162,7 @@ void CppParser::handleMethod(const QString &sType, const QString &sName, const Q QString parentClassName; if (delimPos >= 0) { // Provide Bar instead of Foo::Bar - scopelessName = sName.mid(delimPos); + scopelessName = sName.mid(delimPos+2); // Check what class this function belongs to parentClassName = sName.mid(0, delimPos); diff --git a/RedPandaIDE/parser/parserutils.cpp b/RedPandaIDE/parser/parserutils.cpp index b5eecb29..400eecd9 100644 --- a/RedPandaIDE/parser/parserutils.cpp +++ b/RedPandaIDE/parser/parserutils.cpp @@ -513,9 +513,8 @@ bool isScopeTypeKind(StatementKind kind) switch(kind) { case StatementKind::skClass: case StatementKind::skNamespace: - case StatementKind::skFunction: - case StatementKind::skConstructor: - case StatementKind::skDestructor: + case StatementKind::skEnumType: + case StatementKind::skEnumClassType: return true; default: return false;