diff options
author | Marja Hassinen <ext-marja.2.hassinen@nokia.com> | 2009-10-29 12:57:55 +0200 |
---|---|---|
committer | Marja Hassinen <ext-marja.2.hassinen@nokia.com> | 2009-10-29 12:57:55 +0200 |
commit | f742093e36ebacc2ec8f8134f8bea0438e1e1943 (patch) | |
tree | ee83b5438fb2c594605cdd579b270737fdde4d90 | |
parent | c9d3ead208802fbc0f2b1a5d143b57492b4c1462 (diff) |
libcontextprovider, protocol change: Don't connect to both session + system bus for listening to other providers;
connect only to the one we're using.
-rw-r--r-- | libcontextprovider/src/propertyadaptor.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libcontextprovider/src/propertyadaptor.cpp b/libcontextprovider/src/propertyadaptor.cpp index 1751ab7e..65ddc577 100644 --- a/libcontextprovider/src/propertyadaptor.cpp +++ b/libcontextprovider/src/propertyadaptor.cpp @@ -50,15 +50,11 @@ PropertyAdaptor::PropertyAdaptor(PropertyPrivate* propertyPrivate, QDBusConnecti sconnect(propertyPrivate, SIGNAL(valueChanged(const QVariantList&, const quint64&)), this, SIGNAL(ValueChanged(const QVariantList&, const quint64&))); - // The same value can be provided on session and system bus by - // different providers. Unfortunately, each provider needs both a - // system bus connection and a session bus connection to listen to - // other providers. - QDBusConnection::sessionBus().connect("", objectPath(), DBUS_INTERFACE, "ValueChanged", + // Start listening to ValueChanged signals. We only listen to the + // same bus we're on: that means if the same property is provided + // both on session and on system bus, overhearing won't work. + connection->connect("", objectPath(), DBUS_INTERFACE, "ValueChanged", this, SLOT(onValueChanged(QVariantList, quint64))); - - QDBusConnection::systemBus().connect("", objectPath(), DBUS_INTERFACE, "ValueChanged", - this, SLOT(onValueChanged(QVariantList, quint64))); } /// Implementation of the D-Bus method Subscribe |