OR, not AND

a source is unused if there anre no relays OR nothing directly connected
This commit is contained in:
Marco Martin 2013-12-24 16:58:08 +01:00
parent 80d4ba326e
commit 0d77298d1b

View File

@ -85,7 +85,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" <<this<< visualization << "at interval of"
// << pollingInterval << "to" << objectName();
QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization);
bool connected = objIt != d->relayObjects.end();
@ -327,7 +327,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;
}