mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-18 14:21:28 +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;
|
bool firstTime = true;
|
||||||
globalIsNvme = false;
|
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) {
|
for (int i = 0; i < devices.size(); ++i) {
|
||||||
QJsonObject device = devices[i].toObject();
|
QJsonObject device = devices[i].toObject();
|
||||||
QString deviceName = device["name"].toString();
|
QString deviceName = device["name"].toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user