Skip to content

Commit

Permalink
fix: loadingIndicator isn't deleted
Browse files Browse the repository at this point in the history
loadingIndicator is deleted after spinner action is deleted

Issue: linuxdeepin/developer-center#5747
  • Loading branch information
wangfei committed Apr 16, 2024
1 parent e5f24c8 commit f604089
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dcc-network-plugin/window/wirelessdevicemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ void WirelessDeviceModel::addAccessPoints(QList<AccessPoints *> aps)

ItemAction *item = new ItemAction(ap);
connect(item->iconAction, &DViewItemAction::triggered, this, &WirelessDeviceModel::onDetailTriggered);
connect(item->spinnerAction, &DViewItemAction::destroyed, this, [item] {
if (item->loadingIndicator) {
delete item->loadingIndicator;
item->loadingIndicator = nullptr;
}
});
m_data.append(item);
}
// 排序
Expand Down

0 comments on commit f604089

Please sign in to comment.