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 authored and FeiWang1119 committed Apr 16, 2024
1 parent e5f24c8 commit 8e37571
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dcc-network-plugin/window/wirelessdevicemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ struct ItemAction
loadingIndicator = new DSpinner(parentView);
loadingIndicator->setFixedSize(24, 24);
spinnerAction->setWidget(loadingIndicator);
QObject::connect(spinnerAction, &DViewItemAction::destroyed, loadingIndicator, [this] {
loadingIndicator->deleteLater();
loadingIndicator = nullptr;
});
}
loadingIndicator->start();
} else if (loadingIndicator) {
Expand Down

0 comments on commit 8e37571

Please sign in to comment.