Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [D-Bus] how do you cleanly register an object to a service?
Forum Update on Monday, May 27th 2025

[D-Bus] how do you cleanly register an object to a service?

Scheduled Pinned Locked Moved General and Desktop
dbus
1 Posts 1 Posters 758 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BinaryQuinn
    wrote on last edited by BinaryQuinn
    #1

    So I'm trying to registering an object to a service "abc,def,ghi" I've created to the path "/alpha/beta/gamma". Calling QDBusConnection()::sessionBus().registerObject("/alpha/beta/gamma", this); works but ....

    Result of calling .registerObject("/alpha/beta/gamma", this); What I actually desire
    Service "abc.def.ghi" Service "abc.def.ghi"
    * / * /alpha/beta/gamma
    - * org.freedesktop.DBus.Introspectable - * abc.def.ghi
    - * org.freedesktop.DBus.Peer - * org.freedesktop.DBus.Introspectable
    * /alpha - * org.freedesktop.DBus.Peer
    - * org.freedesktop.DBusIntrospectable - * org.freedesktop.DBus.Properties
    - * org.freedesktop.DBus.Peer
    * /alpha/beta
    - * org.freedesktop.DBus.Introspectable
    - * org.freedesktop.DBus.Peer
    * /alpha/beta/gamma
    - * abc.def.ghi
    - * org.freedesktop.DBus.Introspectable
    - * org.freedesktop.DBus.Peer
    - * org.freedesktop.DBus.Properties

    Note how excessive my current result is and how cluttered it looks. I don't see any other services registered that have this structural issue and don't have any need for the intermediate parts of the path. I need to keep that path as other services will be relying on the naming convention. Is there any way to fix this?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved