Hi ,
(basic info : I'm using QT4.5(.2?), on gnome machine)
I need to connect to a DBus signal and will appreciate your help as I fail to do so.
I actually have two questions regarding the code below as I want to register to "StatusChanged" signal under "/org/gnome/SessionManager/Presence" (I do have it on my machine and i can register to it through the qdbusviewer):
Q-a: Do i send the correct arguments to the QDBusInterface constructor ?
Q-b: When running this code and getting to the connect line I get the following message:
Object::connect: No such signal org::gnome::SessionManager::Presence::StatusChange d(int) in dialog.cpp
So how am i supposed to register to the signal?
My code is:
QDBusConnection bus = QDBusConnection ::sessionBus();
QDBusInterface *dbus_iface = new QDBusInterface("org.gnome.SessionManager","/Presence",
"org.gnome.SessionManager.Presence", bus);
connect(dbus_iface, SIGNAL(StatusChanged(int)), this, SLOT(MySlot(int));
Added after 11 minutes:
more info :
I changed second argument of constructor to be "/org/gnome/SessionManager/Presence". I'm getting the following message:
Invalid D-Bus member name 'stats-tezt' found in interface 'org.gnome.SessionManager.Presence' while parsing introspection
So I guess it is correct because indeed theere is such property,
but I'm still getting the "no suych signal.." error .
Bookmarks