Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. dbus

    Log in to post
    • All categories
    • F

      Unsolved qdbusreply: unexpected reply signature?
      General and Desktop • dbus qdbus signature error • • flodo

      2
      0
      Votes
      2
      Posts
      226
      Views

      F

      You have to register the expected Response first!

      In my case it was like

      #include <QtDBus/QDBusMetaType> // ... typedef QMap<QString, QMap<QString, QVariant> > ConnectionDetails; Q_DECLARE_METATYPE(ConnectionDetails)

      and

      int main() { qDBusRegisterMetaType<ConnectionDetails>(); // ... }
    • swirl

      Unsolved Receiving system D-Bus signals and responding to them
      General and Desktop • dbus qdbus • • swirl

      1
      0
      Votes
      1
      Posts
      174
      Views

      No one has replied

    • L

      Solved Serializing std::variant into QDBusArgument
      General and Desktop • dbus • • Lurkki

      2
      0
      Votes
      2
      Posts
      173
      Views

      SGaist

      Hi,

      Warning I am no expert of that module.

      That said, I would rather go with QDBusVariant and make your std::variant available to Qt's QVariant class.

    • R

      Unsolved QtDBus slot not working with expected prototype
      General and Desktop • qtdbus bluez interfacesadded qvariant dbus • • rsjudka

      6
      0
      Votes
      6
      Posts
      582
      Views

      F

      This question is a bit old now, but I ran into the same problem without finding a solution elsewhere, so maybe this will be useful for others to know.

      I tried exactly the same code as you, and found the the same issue of the signal not connecting properly. What worked for me was to add the following somewhere in the code (e.g. the class constructor) to get executed before the connect() call.

      #include <QDBusMetaType> // Add to code (e.g. constructor) to be run before the connect() call qDBusRegisterMetaType<InterfaceList>();

      The connect() call then returned true, the signal fired, and I was able to extract the object properties straight from the InterfaceList object passed with the signal.

    • B

      Unsolved Linux, DBus, value of sender message
      General and Desktop • dbus linux • • blacky_i

      2
      0
      Votes
      2
      Posts
      241
      Views

      Kent-Dorfman

      I don't believe the message protocol contains that information unless your sender manually inserts an ID into the message being sent. A web search indicates there are some out of band mechanisms to determin the PID of a program using a specific bus endpoint, but not directly within the dbus messages.

      If I'm wrong then I'd love to see the solution myself.

    • B

      Solved Handling delayed dbus method
      General and Desktop • dbus delayed method qvariant qmlextplugin error • • blacky_i

      2
      0
      Votes
      2
      Posts
      680
      Views

      B

      I've solved it.

      To handle long I did not have to send immediately reply (even though tutorial said that we have to). And delayed reply will be send.

      Also in extension, QDBusPendingReply<QString, QByteArray> reply = *call; setting expecting signature to \"say\" and not looking to xml interface.

    • C

      Solved Cannot receive response from DBus
      General and Desktop • qdbus dbus • • Crindu

      3
      0
      Votes
      3
      Posts
      560
      Views

      C

      @SGaist You're right,I did not think about it! I have to remove the systemBus, I'm not using it in reality, it's part of the project that I found on Github. Ok then I can try to make it an instance variable of the class or similer. Thank you!

    • H

      Solved Couldn't received service registered signal when using QDBusServiceWatcher.
      General and Desktop • dbus • • Hieu Nguyen

      2
      0
      Votes
      2
      Posts
      694
      Views

      H

      I have found solution for this, using QDbusConnectionInterface instead QDbusServiceWatcher:

      connect(QDBusConnection::sessionBus().interface(), &QDBusConnectionInterface::serviceRegistered, this, [=](QString a) { qDebug() <<"service R: " << a; });
    • M

      Unsolved QDbus from Python: read DBus property
      General and Desktop • dbus python get property • • Mark81

      1
      0
      Votes
      1
      Posts
      1481
      Views

      No one has replied

    • A

      Solved DBus reply data accessed via QString
      General and Desktop • dbus method qstring qvariant qlist • • amonR2

      22
      0
      Votes
      22
      Posts
      8300
      Views

      A

      @micland

      WOOW!!! Thank you sooo much micland!! It works!!!
      I tried a code similar to yours but some data were missing. Just needed to do a very tiny modification on your code:

      qDebug() << key << value.variant().toString();

      or directly

      qDebug() << value.variant().toString();

      Except it, it is perfect! Thank you again.
      @micland said:

      I have no clue why the qdbusviewer of Qt 5.6 is unable to call the DBus method but the code snippet above is working fine.

      I hope it is going to change as I intend to use it or the 5.7 version very soon.

      Cheers again.

    • M

      Unsolved QDBusArgument array extraction
      General and Desktop • dbus array • • Mark81

      4
      0
      Votes
      4
      Posts
      2733
      Views

      kshegunov

      @Mark81
      I'm certainly not a D-Bus guru, my experience with it is somewhat limited. That said, I think QDBusReply::value can be used, provided you have registered your types.

      Kind regards.

    • M

      Solved pthread configure error
      Installation and Deployment • pthread qt5.6 rpi pulseaudio dbus • • Mark81

      2
      0
      Votes
      2
      Posts
      1858
      Views

      M

      I confirm that adding the pthread library did the trick. But the question "why" is still there :)

    • jjacobsohn

      Unsolved Howto add DBUS call flags in qtdbus (eg. ALLOW_INTERACTIVE_AUTHORIZATION)
      General and Desktop • qtdbus dbus • • jjacobsohn

      1
      0
      Votes
      1
      Posts
      685
      Views

      No one has replied

    • B

      [D-Bus] how do you cleanly register an object to a service?
      General and Desktop • dbus • • BinaryQuinn

      1
      0
      Votes
      1
      Posts
      520
      Views

      No one has replied

    • T

      is qtdbus included in 5.3 release?
      General and Desktop • qt 5.3 dbus configure • • thealse

      1
      0
      Votes
      1
      Posts
      596
      Views

      No one has replied

    • A

      [SOLVED] Building Qt for WinRT with DBus support
      Mobile and Embedded • dbus windows phone windows rt • • ashishbansal

      7
      0
      Votes
      7
      Posts
      2115
      Views

      A

      @SGaist Okay, thanks :)

    • A

      Extract arguments and object path dynamically from net.connman.Manager's GetService method
      General and Desktop • qtdbus dbus • • admd91

      1
      0
      Votes
      1
      Posts
      906
      Views

      No one has replied