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

QDBusContext does not work with property methods

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12, 6.0, 6.1, 5.15, 6.2
    • D-Bus
    • None
    • All

    Description

      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).

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes