summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2019-10-02 12:05:32 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2019-10-07 10:56:45 +0200
commit0c1d23db7bada763f1e5d82cebda0e7738549b48 (patch)
treefc003bd0a86d43a8eb11d9f4478ccecd9fe10fc1
parent56029e1e98b8f019b344ae0c9a01d12a47d29866 (diff)
Doc: Add info about QDBusConnection::ExportChildObjects
Child objects need QObject::objectName. Fixes: QTBUG-17740 Change-Id: Iebf8bcd7252f8a441d7c265aae3d4dd81b3cfa54 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
-rw-r--r--src/dbus/qdbusconnection.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index 2c2dfc1ff6..296d5b369f 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -870,8 +870,12 @@ bool QDBusConnection::disconnect(const QString &service, const QString &path, co
This function does not replace existing objects: if there is already an object registered at
path \a path, this function will return false. Use unregisterObject() to unregister it first.
+ The ExportChildObjects flag exports child objects on D-Bus based on the
+ path of the registered objects and the QObject::objectName of the child.
+ Therefore, it is important for the child object to have an object name.
+
You cannot register an object as a child object of an object that
- was registered with QDBusConnection::ExportChildObjects.
+ was registered with ExportChildObjects.
*/
bool QDBusConnection::registerObject(const QString &path, QObject *object, RegisterOptions options)
{
@@ -890,8 +894,12 @@ bool QDBusConnection::registerObject(const QString &path, QObject *object, Regis
This function does not replace existing objects: if there is already an object registered at
path \a path, this function will return false. Use unregisterObject() to unregister it first.
+ The ExportChildObjects flag exports child objects on D-Bus based on the
+ path of the registered objects and the QObject::objectName of the child.
+ Therefore, it is important for the child object to have an object name.
+
You cannot register an object as a child object of an object that
- was registered with QDBusConnection::ExportChildObjects.
+ was registered with ExportChildObjects.
*/
bool QDBusConnection::registerObject(const QString &path, const QString &interface, QObject *object, RegisterOptions options)
{