set signal relays to be queued upon creation, so that if they are not immediately updated (e.g. the first relay) but then data becomes immediately available afterwards, an update still occurs. this addresses the connecting-using-a-relay-to-an-async-process issue; it's a bit of an odd case, but we've found at least one use case for it and there's no reason not to make it work in the code.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=853470
This commit is contained in:
parent
c64b91b9d3
commit
16ee834701
@ -61,7 +61,7 @@ SignalRelay::SignalRelay(DataContainer* parent, DataContainerPrivate *data, uint
|
||||
m_interval(ival),
|
||||
m_align(align),
|
||||
m_resetTimer(true),
|
||||
m_queued(false)
|
||||
m_queued(true)
|
||||
{
|
||||
//kDebug() << "signal relay with time of" << m_timerId << "being set up";
|
||||
m_timerId = startTimer(immediateUpdate ? 0 : m_interval);
|
||||
@ -142,6 +142,7 @@ void SignalRelay::timerEvent(QTimerEvent *event)
|
||||
if (d->hasUpdates()) {
|
||||
//kDebug() << "emitting data updated directly" << d->data;
|
||||
emit dataUpdated(dc->objectName(), d->data);
|
||||
m_queued = false;
|
||||
} else {
|
||||
// the source wasn't actually updated; so let's put ourselves in the queue
|
||||
// so we get a dataUpdated() call when the data does arrive
|
||||
|
Loading…
Reference in New Issue
Block a user