Sage
6th August 2009, 14:00
Hi,
I'm trying to call dbus method where DBusObjectPath is the argument.
The method is defined as following:
...
<method name="Path">
<arg type="o" direction="in" name="path" />
</method>
...
...
QDBusObjectPath objectpath("/mypath");
((QDBusInterface*)iface)->call("Path",objectpath);
...
With the code above compiler returns following error:
error: ‘QString’ is an inaccessible base of ‘QDBusObjectPath’
However, if I use QDBusObjectPath :: path() as a argument.
...
QDBusObjectPath objectpath("/mypath");
((QDBusInterface*)iface)->call("Path",objectpath.path());
...
The code compiles, but dbus returns the following error, because the parameter is now string not objectpath.
"Method "Path" with signature "s" on interface "org.test" doesn't exist"
So the question is how to send objectpath as an argument in dbus method?
-Sage
I'm trying to call dbus method where DBusObjectPath is the argument.
The method is defined as following:
...
<method name="Path">
<arg type="o" direction="in" name="path" />
</method>
...
...
QDBusObjectPath objectpath("/mypath");
((QDBusInterface*)iface)->call("Path",objectpath);
...
With the code above compiler returns following error:
error: ‘QString’ is an inaccessible base of ‘QDBusObjectPath’
However, if I use QDBusObjectPath :: path() as a argument.
...
QDBusObjectPath objectpath("/mypath");
((QDBusInterface*)iface)->call("Path",objectpath.path());
...
The code compiles, but dbus returns the following error, because the parameter is now string not objectpath.
"Method "Path" with signature "s" on interface "org.test" doesn't exist"
So the question is how to send objectpath as an argument in dbus method?
-Sage