mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-12-14 09:13:40 +00:00
port library
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "extsysmon.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
|
||||
@ -127,7 +128,7 @@ QHash<QString, QString> ExtendedSysMon::updateConfiguration(QHash<QString, QStri
|
||||
} else {
|
||||
QStringList deviceList = _rawConfig["HDDDEV"].split(',', Qt::SkipEmptyParts);
|
||||
QStringList devices;
|
||||
QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$");
|
||||
auto diskRegexp = QRegularExpression("^/dev/[hms]d[a-z]$");
|
||||
for (auto &device : deviceList)
|
||||
if ((QFile::exists(device)) && (device.contains(diskRegexp)))
|
||||
devices.append(device);
|
||||
|
||||
Reference in New Issue
Block a user