massive changes inside

* use pass by ref instead of by value if possible
* use reference in interation over collections
* fix no tag inserting
This commit is contained in:
2017-05-04 15:00:50 +03:00
parent 6e99e262d4
commit 6e62ceaac7
119 changed files with 645 additions and 634 deletions

View File

@ -42,7 +42,7 @@ ExtendedSysMon::ExtendedSysMon(QObject *parent, const QVariantList &args)
// init aggregator
m_aggregator = new ExtSysMonAggregator(this, m_configuration);
for (auto source : m_aggregator->sources())
for (auto &source : m_aggregator->sources())
setData(source, m_aggregator->initialData(source));
}
@ -149,7 +149,7 @@ ExtendedSysMon::updateConfiguration(QHash<QString, QString> rawConfig) const
QChar(','), QString::SkipEmptyParts);
QStringList devices;
QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$");
for (auto device : deviceList)
for (auto &device : deviceList)
if ((QFile::exists(device)) && (device.contains(diskRegexp)))
devices.append(device);
if (devices.isEmpty())
@ -166,7 +166,7 @@ ExtendedSysMon::updateConfiguration(QHash<QString, QString> rawConfig) const
if (rawConfig[QString("PLAYERSYMBOLS")].toInt() <= 0)
rawConfig[QString("PLAYERSYMBOLS")] = QString("10");
for (auto key : rawConfig.keys())
for (auto &key : rawConfig.keys())
qCInfo(LOG_ESM) << key << "=" << rawConfig[key];
return rawConfig;
}