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

Dbus & TrackChange signal

Tags: None
(comma "," separated)
anthon
Registered Member
Posts
26
Karma
0
OS

Dbus & TrackChange signal

Wed Nov 18, 2009 2:05 am
Hi
I'm trying to "listen to" the TrackChange signal emited by Amarok with qtdbus. I'm very new to dbus, so I used this tutorial:
http://techbase.kde.org/Development/Tut ... nd_Signals
Here's what I got:
Code: Select all
QDBusInterface *interface = new QDBusInterface("org.kde.amarok",
                                               "/Player",
                                               "org.freedesktop.MediaPlayer");
connect(interface, SIGNAL(TrackChange(QVariantMap)), this, SLOT(trackChanged()));

This doesn't work, as I get this message at runtime:
Object::connect: No such signal org::freedesktop::MediaPlayer::TrackChange(QVariantMap) in mainwindow.cpp:125

I don't understand, because this signal exists if I look into qdbusviewer, and also I can see this signal emited using dbus-monitor.
Also, I noticed that this signal doesn't appear when I use qdbus in command line.
qdbus org.kde.amarok /Player | grep signal
signal void org.freedesktop.MediaPlayer.CapsChange(int)

CapsChange(int) is actually the only signal I can connect to. (I can't connect to StatusChange neither.)
Does anyone have an explanation? Am I missing something?


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, Sogou [Bot], Yahoo [Bot]