Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #19743: [ARS] Improve pointers deletion
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
JesusPoderoso committed Nov 13, 2023
1 parent 737cfc0 commit f09da2b
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Engine.cpp
Original file line number Diff line number Diff line change
@@ -994,9 +994,10 @@ bool Engine::update_entity_status(
backend::StatusKind kind)
{
int counter = 0;
auto empty_item = new models::StatusTreeItem(backend::ID_ALL, std::string("No issues found"), false, std::string(""));
if (id == backend::ID_ALL)
{
auto empty_item = new models::StatusTreeItem(backend::ID_ALL,
std::string("No issues found"), false, std::string(""));
entity_status_model_->addTopLevelItem(empty_item);
}
else
1 change: 1 addition & 0 deletions src/model/tree/StatusTreeItem.cpp
Original file line number Diff line number Diff line change
@@ -166,6 +166,7 @@ void StatusTreeItem::removeChild(
if (item)
{
child_items_.removeAll(item);
delete item;
}
}

1 change: 0 additions & 1 deletion src/model/tree/StatusTreeModel.cpp
Original file line number Diff line number Diff line change
@@ -92,7 +92,6 @@ void StatusTreeModel::filter(
{
for (int i = 0; i < source_model_->rootItem()->childCount(); i++)
{

addTopLevelItem(copy(source_model_->rootItem()->child(i), entity_id));
}
}

0 comments on commit f09da2b

Please sign in to comment.