mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-14 00:30:53 +03:00
Fix issue where disksGroup actions were not being cleared
This commit is contained in:
@@ -177,6 +177,13 @@ void MainWindow::updateUI()
|
||||
bool firstTime = true;
|
||||
globalIsNvme = false;
|
||||
|
||||
QList<QAction*> oldActions = disksGroup->actions();
|
||||
for (QAction *action : std::as_const(oldActions)) {
|
||||
disksGroup->removeAction(action);
|
||||
menuDisk->removeAction(action);
|
||||
delete action;
|
||||
}
|
||||
|
||||
for (int i = 0; i < devices.size(); ++i) {
|
||||
QJsonObject device = devices[i].toObject();
|
||||
QString deviceName = device["name"].toString();
|
||||
|
||||
Reference in New Issue
Block a user