![]() |
Qt: dbus method call fails
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 Code:
can't find method Phone.Net::get_operator_name Code:
QDBusInterface device(QLatin1String("com.nokia.phone.net"), Many thanks. ;) |
Re: Qt: dbus method call fails
It's an issue of wrong types. You're sending (I believe) three integers, when the method wants a byte and two quint32's. I would cast 0 to a uchar and make the other two quint32.
That error message is dodgy; I think it's a custom one sent by the CSD daemon |
Re: Qt: dbus method call fails
Thanks for your reply. :)
I get the same error passing one uchar and two quint32 variables. EDIT: From Qt documentation here: http://doc.trolltech.org/latest/qdbustypesystem.html uchar --> BYTE uint --> UINT32 but also using uchar and two uint I get the same error...strange. |
Re: Qt: dbus method call fails
This one works for me:
QDBusMessage msg = device.call(QLatin1String("get_operator_name"), QVariant::fromValue(uchar(0)), opCode, countryCode); |
Re: Qt: dbus method call fails
Yes, it works using QVariant::fromValue(), many thanks. ;)
|
All times are GMT. The time now is 16:36. |
vBulletin® Version 3.8.8