summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusabstractinterface.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-23 17:28:35 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-28 09:16:19 (GMT)
commit26c5680cf5adbf0c87357d84f2e2a6256724d4b7 (patch)
tree17a2e89561a590b76db368161034409abd167f3b /src/dbus/qdbusabstractinterface.cpp
parent95d68417bfced3458e72ab3fdbc8f97ab15dd1db (diff)
downloadQt-26c5680cf5adbf0c87357d84f2e2a6256724d4b7.zip
Qt-26c5680cf5adbf0c87357d84f2e2a6256724d4b7.tar.gz
Qt-26c5680cf5adbf0c87357d84f2e2a6256724d4b7.tar.bz2
Fix the use of the owner when connecting the service "watcher".
Use null services to indicate we're not interested in the owner, but empty-but-not-null to indicate we don't know what the owner is. Since empty service names are not valid, this will mean that this rule won't match.
Diffstat (limited to 'src/dbus/qdbusabstractinterface.cpp')
-rw-r--r--src/dbus/qdbusabstractinterface.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index bea365a..994da10 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -560,9 +560,16 @@ void QDBusAbstractInterface::connectNotify(const char *signal)
return;
QDBusConnectionPrivate *conn = d->connectionPrivate();
- if (conn)
- conn->connectRelay(d->service, d->currentOwner, d->path, d->interface,
+ if (conn) {
+ // do we know what our owner is?
+ QString owner;
+ if (!d->service.isEmpty() && d->currentOwner.isNull())
+ owner = QLatin1String("");
+ else
+ owner = d->currentOwner;
+ conn->connectRelay(d->service, owner, d->path, d->interface,
this, signal);
+ }
}
/*!