Skip to content

Commit

Permalink
Doc: Add info about QDBusConnection::ExportChildObjects
Browse files Browse the repository at this point in the history
Child objects need QObject::objectName.

Fixes: QTBUG-17740
Change-Id: Iebf8bcd7252f8a441d7c265aae3d4dd81b3cfa54
Reviewed-by: Paul Wicking <[email protected]>
Reviewed-by: Frederik Gladhorn <[email protected]>
  • Loading branch information
leena-miettinen committed Oct 7, 2019
1 parent 56029e1 commit 0c1d23d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/dbus/qdbusconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down

0 comments on commit 0c1d23d

Please sign in to comment.