This forum has been archived. All content is frozen. Please use KDE Discuss instead.

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

Tags: None
(comma "," separated)
Dibo
Registered Member
Posts
28
Karma
0
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:
Code: Select all
struct AmarokStatus {
    int st1;
    int st2;
    int st3;
    int st4;
};

Q_DECLARE_METATYPE(AmarokStatus)
qDBusRegisterMetaType<AmarokStatus>();

But when call:
Code: Select all
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


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]