From b4490858701a8a84ac53b7840f2c80b1279a56ae Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 27 Oct 2023 20:28:41 +0800 Subject: [PATCH] - enhancement: Hide symbols that contains "<>" in code suggestions. --- NEWS.md | 3 ++- RedPandaIDE/widgets/codecompletionpopup.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 8855e60d..9c5d1049 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,7 +20,8 @@ Red Panda C++ Version 2.26 - fix: Code suggestion for identifiers after '*' (eg. 3 * item->price) can't correct. - fix: C++ compiler atrribute '[[xxx]]' are not correctly handled. - fix: If the integrated gcc compiler is add to path, auto find compilers will find in twice. (Windows) - - enhancement: when induce type info for return value, try to select the overloaded one that doesn't have an "auto" type. + - enhancement: When induce type info for return value, try to select the overloaded one that doesn't have an "auto" type. + - enhancement: Hide symbols that contains "<>" in code suggestions. Red Panda C++ Version 2.25 diff --git a/RedPandaIDE/widgets/codecompletionpopup.cpp b/RedPandaIDE/widgets/codecompletionpopup.cpp index 0c2775f3..17385755 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.cpp +++ b/RedPandaIDE/widgets/codecompletionpopup.cpp @@ -296,7 +296,8 @@ void CodeCompletionPopup::addStatement(const PStatement& statement, const QStrin && (fileName == statement->fileName)) return; mAddedStatements.insert(statement->command); - mFullCompletionStatementList.append(statement); + if (statement->kind == StatementKind::skUserCodeSnippet || !statement->fullName.contains("<")) + mFullCompletionStatementList.append(statement); } static bool nameComparator(PStatement statement1,PStatement statement2) {