path: root/src/dbus/qdbusservicewatcher.cpp
diff options
authorDavid Edmundson <>2018-04-06 01:27:32 +0100
committerDavid Faure <>2018-11-06 09:52:09 +0000
commitd761c6278305ef8737daca4bc3e61a119b40e107 (patch)
treea046ea21152c5182884a58074a4c3af66b5f9e34 /src/dbus/qdbusservicewatcher.cpp
parentfc88dd52a42da682cbd360916be7c9f94a69b72c (diff)
QDBusServiceWatcher namespace prefix support
This allows a user to efficiently watch for services with a common domain prefix. This is exposed in the API via a wildcard character in the service name. For example creating a watcher on "org.mpris*" will match "" "" and "org.mpris" itself. It will not match org.mprisasdf. Internally the argument match rules have been expanded from a single QStringList to a struct containing args and arg0namespace. This was done so that we can easily use argpath in match rules in the future. Change-Id: I55882ab603cc6ba478e8c0ea9a6800f6e483a50c Reviewed-by: Kai Uwe Broulik <> Reviewed-by: Thiago Macieira <> Reviewed-by: David Faure <>
Diffstat (limited to 'src/dbus/qdbusservicewatcher.cpp')
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index 0c2fb9118f..b0bfe7254d 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -139,6 +139,17 @@ void QDBusServiceWatcherPrivate::removeService(const QString &service)
QDBusConnectionInterface::serviceOwnerChanged() signal because it allows
one to receive only the signals for which the class is interested in.
+ Ending a service name with the character '*' will match all service names
+ within the specified namespace.
+ For example "com.example.backend1*" will match
+ \list
+ \li com.example.backend1
+ \li
+ \li
+ \endlist
+ Substrings in the same domain will not be matched, i.e "com.example.backend12".
\sa QDBusConnection