Commit 03fa8a74 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
parent b0086cb4
Pipeline #102671 passed with stage
in 2 minutes and 16 seconds
......@@ -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