diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-12-31 21:55:14 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-01-06 09:18:41 (GMT) |
commit | 6e58c3bcd2dba2d02c6f9d4636ac430aef0321eb (patch) | |
tree | 4f8e8c354dd5cc064fc0a322b897b3473e61c1cc | |
parent | 61bb8a18c3d3c6e78085bc04c70f899a7e6c8809 (diff) | |
download | Qt-6e58c3bcd2dba2d02c6f9d4636ac430aef0321eb.zip Qt-6e58c3bcd2dba2d02c6f9d4636ac430aef0321eb.tar.gz Qt-6e58c3bcd2dba2d02c6f9d4636ac430aef0321eb.tar.bz2 |
Use the watched service name list in matching incoming signals too.
Task-number: QTBUG-5979
Reviewed-By: TrustMe
(cherry picked from commit 200413f08334574108fdb07efaa7648f90209a8f)
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 41004c3..69ed72f 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()) |