Fix clazy warning

This commit is contained in:
Spiros
2024-06-13 20:25:54 +03:00
parent 523843b349
commit 29cf0027f6

View File

@@ -276,18 +276,20 @@ void MainWindow::updateUI()
button->setCheckable(true);
button->setAutoExclusive(true);
int buttonIndex = buttonGroup->buttons().indexOf(button);
auto populateAndNavigate = [=]() {
if (isNvme) {
populateWindow(localObj, health, nvmeSmartOrdered);
} else {
populateWindow(localObj, health);
}
updateNavigationButtons(buttonGroup->buttons().indexOf(button));
updateNavigationButtons(buttonIndex);
};
connect(button, &QPushButton::clicked, this, [=]() {
populateAndNavigate();
disksGroup->actions()[buttonGroup->buttons().indexOf(button)]->setChecked(true);
disksGroup->actions().at(buttonIndex)->setChecked(true);
});
connect(diskAction, &QAction::triggered, this, [=]() {