mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-07 20:09:55 +03:00
Use as_const on the rest of the source files
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user