Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99277

QDBusContext does not work with property methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.11.0 FF
    • 5.12, 5.15, 6.0, 6.1, 6.2
    • D-Bus
    • None
    • All
    • 423eb26ef (dev)

      I have an object registered with D-Bus, which derives from QDBusContext and exposes some Q_PROPERTY on the bus. D-Bus provides an implementation of the org.freedesktop.DBus.Properties interface, so that these properties are transparently exposed to D-Bus clients.

      However, inside the getter and setter methods of this properties, QDBusContext::calledFromDBus() returns false.

      This makes it impossible to:

      1. Return a D-Bus error (in case the property is set to an invalid value)
      2. Know who the caller was (in case I want to return a different value depending on how privileged the caller is).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            mardy Alberto Mardegan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes