diff options
author | Marja Hassinen <ext-marja.2.hassinen@nokia.com> | 2009-10-26 16:16:31 +0200 |
---|---|---|
committer | Marja Hassinen <ext-marja.2.hassinen@nokia.com> | 2009-10-26 16:16:31 +0200 |
commit | 0c1c0410ce8c62cb93dc1305bcbab93694353fd0 (patch) | |
tree | ba9ca35ccb06d641af20f7c4df408d41c34a9e07 | |
parent | 52cc9856f37ccc939fad31c559071ca23a48220b (diff) |
libcontextprovider, protocol change: Fixing the previous fix: safeguards agains emitting firstSubscriber and lastSubscriber signals
unnecessarily.
-rw-r--r-- | libcontextprovider/src/propertyprivate.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libcontextprovider/src/propertyprivate.cpp b/libcontextprovider/src/propertyprivate.cpp index fce31811..80c480f6 100644 --- a/libcontextprovider/src/propertyprivate.cpp +++ b/libcontextprovider/src/propertyprivate.cpp @@ -132,14 +132,18 @@ void PropertyPrivate::emitValue() void PropertyPrivate::setSubscribed() { - subscribed = true; - emit firstSubscriberAppeared(key); + if (subscribed == false) { + subscribed = true; + emit firstSubscriberAppeared(key); + } } void PropertyPrivate::setUnsubscribed() { - subscribed = false; - emit lastSubscriberDisappeared(key); + if (subscribed == true) { + subscribed = false; + emit lastSubscriberDisappeared(key); + } } void PropertyPrivate::updateOverheardValue(const QVariantList& v, const quint64& t) |