nrabara
27th November 2009, 06:09
In following simple code , when I try to get path()[msg.path()]. it gives null string.
It should give a object path from the received message.
QDBusConnection conn = QDBusConnection::systemBus();
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
QDBusInterface interface("org.bluez", "/org/bluez/806/hci0", "org.bluez.Adapter" , conn,0);
qDebug() << "Isvalid - "<< interface.isValid();
QDBusMessage msg ;
msg = interface.call("DefaultAdapter"); // this will return a object path
qDebus() << "Path = " << msg.path(); // returns NULL string
a.exec();
}
How to find the Object Path from the received QDBusMessage object
Your suggestion would be a great help for me.
It should give a object path from the received message.
QDBusConnection conn = QDBusConnection::systemBus();
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
QDBusInterface interface("org.bluez", "/org/bluez/806/hci0", "org.bluez.Adapter" , conn,0);
qDebug() << "Isvalid - "<< interface.isValid();
QDBusMessage msg ;
msg = interface.call("DefaultAdapter"); // this will return a object path
qDebus() << "Path = " << msg.path(); // returns NULL string
a.exec();
}
How to find the Object Path from the received QDBusMessage object
Your suggestion would be a great help for me.