Commit 7406648c authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Don't update disks if no one is listening

It's not very useful to update things that aren't being used.

BUG: 445039


(cherry picked from commit 03fa8a74)
parent 2a1f5af5
......@@ -280,9 +280,18 @@ void DisksPlugin::addAggregateSensors()
void DisksPlugin::update()
{
bool anySubscribed = false;
for (auto volume : m_volumesByDevice) {
volume->update();
if (volume->isSubscribed()) {
anySubscribed = true;
volume->update();
}
}
if (!anySubscribed) {
return;
}
qint64 elapsed = 0;
if (m_elapsedTimer.isValid()) {
elapsed = m_elapsedTimer.restart();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment