aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcontextprovider/src/propertyprivate.cpp12
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)