summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-12-31 21:55:14 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-02 02:18:24 (GMT)
commit200413f08334574108fdb07efaa7648f90209a8f (patch)
tree2db4a45a3ae9d3f001ed82b2cdad7cd6f811c0b4 /src/dbus
parent988decb610ec5e12380c60204878a0b9e2aaeb01 (diff)
downloadQt-200413f08334574108fdb07efaa7648f90209a8f.zip
Qt-200413f08334574108fdb07efaa7648f90209a8f.tar.gz
Qt-200413f08334574108fdb07efaa7648f90209a8f.tar.bz2
Use the watched service name list in matching incoming signals too.
Task-number: QTBUG-5979 Reviewed-By: TrustMe
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusintegrator.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 0c436f0..f265962 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1491,8 +1491,14 @@ void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage
//qDBusDebug() << signalHooks.keys();
for ( ; it != end && it.key() == key; ++it) {
const SignalHook &hook = it.value();
- if (!hook.owner.isNull() && hook.owner != msg.service())
- continue;
+ if (!hook.service.isEmpty()) {
+ const QString owner =
+ shouldWatchService(hook.service) ?
+ watchedServices.value(hook.service).owner :
+ hook.service;
+ if (owner != msg.service())
+ continue;
+ }
if (!hook.path.isEmpty() && hook.path != msg.path())
continue;
if (!hook.signature.isEmpty() && hook.signature != msg.signature())