diff options
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | libcontextsubscriber/src/contextkitplugin.cpp | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 90509b6e..9d2a3d4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,8 @@ contextkit (0.5.19.2~unreleased) unstable; urgency=low - * Replace this version with 0.5.21 (0.5.19.1 and 0.5.20 merged together) - if no more parallel bugfix releases are needed. + * Fixes: NB#200325 - -- Marja Hassinen <marja.hassinen@nokia.com> Mon, 18 Oct 2010 13:03:20 +0300 + -- Marja Hassinen <marja.hassinen@nokia.com> Tue, 02 Nov 2010 14:14:39 +0200 contextkit (0.5.19.1) unstable; urgency=low diff --git a/libcontextsubscriber/src/contextkitplugin.cpp b/libcontextsubscriber/src/contextkitplugin.cpp index b70df7c9..55786d69 100644 --- a/libcontextsubscriber/src/contextkitplugin.cpp +++ b/libcontextsubscriber/src/contextkitplugin.cpp @@ -115,6 +115,7 @@ void ContextKitPlugin::reset() delete(managerInterface); managerInterface = 0; newProtocol = false; + // Disconnect the ValueChanged signal for all keys (object paths) connection->disconnect(busName, "", propertyIName, "ValueChanged", this, SLOT(onNewValueChanged(QList<QVariant>,quint64,QDBusMessage))); } @@ -190,11 +191,6 @@ void ContextKitPlugin::useNewProtocol() { newProtocol = true; - // connect to dbus value changes too! - connection->connect(busName, "", propertyIName, "ValueChanged", - this, SLOT(onNewValueChanged(QList<QVariant>,quint64,QDBusMessage))); - - if (providerListener->isServicePresent() == DBusNameListener::NotPresent) return; @@ -248,6 +244,12 @@ void ContextKitPlugin::newSubscribe(const QString& key) objectPath, propertyIName, "Subscribe")); + + // connect to dbus value changes too, but only for this key + connection->connect(busName, objectPath, propertyIName, "ValueChanged", + this, + SLOT(onNewValueChanged(QList<QVariant>,quint64,QDBusMessage))); + PendingSubscribeWatcher *psw = new PendingSubscribeWatcher(pc, key, this); sconnect(psw, SIGNAL(subscribeFinished(QString)), @@ -275,6 +277,12 @@ void ContextKitPlugin::unsubscribe(QSet<QString> keys) objectPath, propertyIName, "Unsubscribe")); + // disconnect the ValueChanged signal for this key + connection->disconnect(busName, objectPath, + propertyIName, "ValueChanged", + this, + SLOT(onNewValueChanged(QList<QVariant>,quint64,QDBusMessage))); + } else subscriberInterface->unsubscribe(keys); |