OR, not AND
a source is unused if there anre no relays OR nothing directly connected
This commit is contained in:
parent
80d4ba326e
commit
0d77298d1b
@ -85,7 +85,7 @@ bool DataContainer::visualizationIsConnected(QObject *visualization) const
|
|||||||
void DataContainer::connectVisualization(QObject *visualization, uint pollingInterval,
|
void DataContainer::connectVisualization(QObject *visualization, uint pollingInterval,
|
||||||
Plasma::Types::IntervalAlignment alignment)
|
Plasma::Types::IntervalAlignment alignment)
|
||||||
{
|
{
|
||||||
//qDebug() << "connecting visualization" << visualization << "at interval of"
|
//qDebug() << "connecting visualization" <<this<< visualization << "at interval of"
|
||||||
// << pollingInterval << "to" << objectName();
|
// << pollingInterval << "to" << objectName();
|
||||||
QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization);
|
QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization);
|
||||||
bool connected = objIt != d->relayObjects.end();
|
bool connected = objIt != d->relayObjects.end();
|
||||||
@ -327,7 +327,7 @@ void DataContainer::setNeedsUpdate(bool update)
|
|||||||
|
|
||||||
bool DataContainer::isUsed() const
|
bool DataContainer::isUsed() const
|
||||||
{
|
{
|
||||||
return !d->relays.isEmpty() &&
|
return !d->relays.isEmpty() ||
|
||||||
receivers(SIGNAL(dataUpdated(QString, Plasma::DataEngine::Data))) > 0;
|
receivers(SIGNAL(dataUpdated(QString, Plasma::DataEngine::Data))) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user