fix #293 : No icons for inherited class private members.

This commit is contained in:
Roy Qu 2024-03-21 07:10:48 +08:00
parent 6c454143cb
commit 0426bfe1b0
3 changed files with 7 additions and 2 deletions

View File

@ -62,6 +62,7 @@ Red Panda C++ Version 2.27
- change: Invert scroll direction in horizontal, like in vertical. - change: Invert scroll direction in horizontal, like in vertical.
- enhancement: Show type completion info after 'const' and 'volatile' - enhancement: Show type completion info after 'const' and 'volatile'
- fix: Caret unseen when move to a long line end by press END. - fix: Caret unseen when move to a long line end by press END.
- fix: No icons for inherited class private members.
Red Panda C++ Version 2.26 Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors. - enhancement: Code suggestion for embedded std::vectors.

View File

@ -308,6 +308,8 @@ QPixmap IconsManager::getPixmapForStatement(PStatement statement)
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTED_METHOD)); return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTED_METHOD));
} else if (statement->accessibility == StatementAccessibility::Public) { } else if (statement->accessibility == StatementAccessibility::Public) {
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_METHOD)); return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_METHOD));
} else {
return *(pIconsManager->getPixmap(IconsManager::PARSER_PRIVATE_METHOD));
} }
} else { } else {
if (statement->accessibility == StatementAccessibility::Protected) { if (statement->accessibility == StatementAccessibility::Protected) {
@ -329,6 +331,8 @@ QPixmap IconsManager::getPixmapForStatement(PStatement statement)
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTD_VAR)); return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_PROTECTD_VAR));
} else if (statement->accessibility == StatementAccessibility::Public) { } else if (statement->accessibility == StatementAccessibility::Public) {
return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_VAR)); return *(pIconsManager->getPixmap(IconsManager::PARSER_INHERITED_VAR));
} else {
return *(pIconsManager->getPixmap(IconsManager::PARSER_PRIVATE_VAR));
} }
} else { } else {
if (statement->accessibility == StatementAccessibility::Protected) { if (statement->accessibility == StatementAccessibility::Protected) {

View File

@ -1328,7 +1328,7 @@ void CppParser::addProjectFile(const QString &fileName, bool needScan)
//value.replace('/','\\'); // only accept full file names //value.replace('/','\\'); // only accept full file names
// Update project listing // Update project listing
mProjectFiles.insert(fileName); mProjectFiles.insert(fileName);
// Only parse given file // Only parse given file
if (needScan && !mPreprocessor.fileScanned(fileName)) { if (needScan && !mPreprocessor.fileScanned(fileName)) {
@ -1342,7 +1342,7 @@ PStatement CppParser::addInheritedStatement(const PStatement& derived, const PSt
PStatement statement = addStatement( PStatement statement = addStatement(
derived, derived,
inherit->fileName, inherit->fileName,
inherit->type, // "Type" is already in use inherit->type,
inherit->command, inherit->command,
inherit->args, inherit->args,
inherit->noNameArgs, inherit->noNameArgs,