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. Qdbus - can't connect to dbus signal with struct argument
Forum Updated to NodeBB v4.3 + New Features

Qdbus - can't connect to dbus signal with struct argument

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.0k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    Kobid
    wrote on last edited by
    #1

    Hi,
    I'm trying to connect to amarok d-bus signal StatusChange (reference: https://xmms2.org/wiki/MPRIS#StatusChange). Interface and struct is ok because I can connect to simple signal CapsChange(int) in same interface and can get status by GetStatus dbus method, so this marshall struct is ok:
    @struct AmarokStatus {
    int st1;
    int st2;
    int st3;
    int st4;
    };

    Q_DECLARE_METATYPE(AmarokStatus)
    qDBusRegisterMetaType<AmarokStatus>();@

    But when call:
    @mInf = new QDBusInterface("org.mpris.MediaPlayer2.amarok", "/Player",
    "org.freedesktop.MediaPlayer", QDBusConnection::sessionBus(),this);
    connect(mInf, SIGNAL(StatusChange(AmarokStatus)), this, SLOT(statusChanged(AmarokStatus)));
    connect(mInf, SIGNAL(CapsChange(int)), this, SLOT(capsChange(int)));@

    I got message:
    Object::connect: No such signal org::freedesktop::MediaPlayer::StatusChange(AmarokStatus)

    I have tried with signal( StatusChange( struct ) ) and signal( StatusChange( QDbusargument ) ) and other types but same message

    D-Feet is saying that definition of StatusChange is: StatusChange( Struct of ( Int32, Int32, Int32, Int32 ) ), same with dbus-monitor. And same problem with signal TrackChange(array of struct). So I'm definitely messing something with connect() method.

    Regards

    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