From 20339b3e9a32264e86e7c176859dce27cda82f9a Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 20 Feb 2024 14:45:12 +0800 Subject: [PATCH] - Fix: Function list is not correctly retrived for full-scoped functions --- NEWS.md | 1 + RedPandaIDE/RedPandaIDE.pro | 2 +- RedPandaIDE/editor.cpp | 2 +- RedPandaIDE/parser/cppparser.cpp | 2 +- Red_Panda_CPP.pro | 2 -- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index 4c674ec0..cfe3460f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -45,6 +45,7 @@ Red Panda C++ Version 2.26 - Fix: Can't goto definition/declaration into files that not saved. - Fix: Expression that starts with full scoped variables might be treated as var definition. - Enhancement: Don't auto-indent in raw string. + - Fix: Function list is not correctly retrived for full-scoped functions. Red Panda C++ Version 2.25 diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 328ed9e1..ee02c1ac 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -18,7 +18,7 @@ APP_NAME = RedPandaCPP APP_VERSION = 2.26 # TEST_VERSION = beta2 -TEST_VERSION = $$system(git rev-list HEAD --count) +system(git rev-list HEAD --count): TEST_VERSION = $$system(git rev-list HEAD --count) contains(QMAKE_HOST.arch, x86_64):{ DEFINES += ARCH_X86_64=1 diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 683878c2..cdd654ab 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -4358,7 +4358,7 @@ void Editor::updateFunctionTip(bool showTip) QList statements=mParser->getListOfFunctions(mFilename, s, functionNamePos.line); - +// qDebug()<<"finding function list:"<functionTip()->addTip( statement->command, diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index c933d689..f56c2389 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -435,7 +435,7 @@ PStatement CppParser::doFindStatementOf(const QString &fileName, } } if (!isSTLContainerFunctions) - typeStatement = doFindTypeDefinitionOf(fileName,statement->type, parentScopeType); + typeStatement = doFindTypeDefinitionOf(fileName,statement->type, statement->parentScope.lock()); //it's stl smart pointer if ((typeStatement) diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index 84d36729..47212503 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -23,8 +23,6 @@ APP_NAME = RedPandaCPP APP_VERSION = 2.26 -TEST_VERSION = beta2 - win32: { SUBDIRS += \ redpanda-win-git-askpass