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:
Aaron J. Seigo 2008-08-27 19:08:46 +00:00
parent c64b91b9d3
commit 16ee834701

View File

@ -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