From 16ee83470102f873bac659834b31f44e0f62465f Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 27 Aug 2008 19:08:46 +0000 Subject: [PATCH] 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 --- private/datacontainer_p.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/private/datacontainer_p.cpp b/private/datacontainer_p.cpp index 8267201aa..bcd9386c8 100644 --- a/private/datacontainer_p.cpp +++ b/private/datacontainer_p.cpp @@ -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