View Single Post
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#1
Hi!

I have a problem with a dbus method call using Qt.

The method I'm calling is this (it works in the terminal):
Code:
dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_operator_name byte:0 uint32:10 uint32:222
method return sender=:1.20 -> dest=:1.4287 reply_serial=2
   string "vodafone IT"
   int32 0
When I try to call it from Qt I always get the error:
Code:
can't find method Phone.Net::get_operator_name
Here's my code
Code:
QDBusInterface device(QLatin1String("com.nokia.phone.net"),
                      QLatin1String("/com/nokia/phone/net"),
                      QLatin1String("Phone.Net"),
                      QDBusConnection::systemBus());
int opCode = 10;
int countryCode = 222;
QDBusMessage msg = device.call(QLatin1String("get_operator_name"), 0, opCode, countryCode);
I'm almost sure the device is correct (it works for calling get_registration_status) so what's the problem?

Many thanks.

Last edited by sakya; 2011-09-07 at 19:36.