From 443aa541fcb733cf837b50a798a1f458e7cfccf1 Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Sun, 10 Oct 2021 00:46:19 +0800 Subject: [PATCH] - fix: can't correctly find definition of the symbols in namespace --- NEWS.md | 1 + RedPandaIDE/parser/cppparser.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 226faaee..ba11b084 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ Version 0.6.3 - fix: project's file not correctly syntaxed when open in editor - libturtle update: add fill() / setBackgroundColor() /setBackgroundImage() functions - fix: code fold calculation not correct, when editing code + - fix: can't correctly find definition of the symbols in namespace Version 0.6.2 - fix: The Enter key in the numpad doesn't work diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 2be16a47..040517f7 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -271,6 +271,8 @@ PStatement CppParser::findStatementOf(const QString &fileName, const QString &ph if (statement) break; } + if (!statement) + statement = findStatementStartingFrom(fileName,nextScopeWord,currentScope->parentScope.lock(),force); } else { statement = findStatementStartingFrom(fileName,nextScopeWord,parentScopeType,force); }