Use as_const on the rest of the source files

This commit is contained in:
Spiros
2024-07-13 18:31:16 +03:00
parent 81ba1e5754
commit 6a74b8b803
2 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
void utils::clearButtonGroup(QButtonGroup* buttonGroup, QHBoxLayout* horizontalLayout, QSpacerItem* buttonStretch, QMenu* menuDisk)
{
QList<QAbstractButton*> buttons = buttonGroup->buttons();
for (QAbstractButton* button : buttons) {
for (QAbstractButton* button : std::as_const(buttons)) {
buttonGroup->removeButton(button);
delete button;
}
@@ -27,7 +27,7 @@ QString utils::getSmartctlPath() {
paths << "/usr/sbin" << "/usr/local/sbin";
for (const QString &path : paths) {
for (const QString &path : std::as_const(paths)) {
QString absolutePath = QDir(path).absoluteFilePath("smartctl");
if (QFile::exists(absolutePath) && QFileInfo(absolutePath).isExecutable()) {
return absolutePath;