From e272c313004be1f4bcfd5e14cb5677c6aa51eaf2 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 24 Dec 2013 16:58:08 +0100 Subject: [PATCH] OR, not AND a source is unused if there anre no relays OR nothing directly connected --- src/plasma/datacontainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plasma/datacontainer.cpp b/src/plasma/datacontainer.cpp index 218c8627d..b017cf1bc 100644 --- a/src/plasma/datacontainer.cpp +++ b/src/plasma/datacontainer.cpp @@ -106,7 +106,7 @@ bool DataContainer::visualizationIsConnected(QObject *visualization) const void DataContainer::connectVisualization(QObject *visualization, uint pollingInterval, Plasma::Types::IntervalAlignment alignment) { - //qDebug() << "connecting visualization" << visualization << "at interval of" + //qDebug() << "connecting visualization" <::iterator objIt = d->relayObjects.find(visualization); bool connected = objIt != d->relayObjects.end(); @@ -363,7 +363,7 @@ void DataContainer::setNeedsUpdate(bool update) bool DataContainer::isUsed() const { - return !d->relays.isEmpty() && + return !d->relays.isEmpty() || receivers(SIGNAL(dataUpdated(QString, Plasma::DataEngine::Data))) > 0; }