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>
...
...
<method name="Path">
<arg type="o" direction="in" name="path" />
</method>
...
To copy to clipboard, switch view to plain text mode
...
...
...
QDBusObjectPath objectpath("/mypath");
((QDBusInterface*)iface)->call("Path",objectpath);
...
To copy to clipboard, switch view to plain text mode
With the code above compiler returns following error:
error: ‘QString’ is an inaccessible base of ‘QDBusObjectPath’
To copy to clipboard, switch view to plain text mode
However, if I use QDBusObjectPath :: path() as a argument.
...
...
...
QDBusObjectPath objectpath("/mypath");
((QDBusInterface*)iface)->call("Path",objectpath.path());
...
To copy to clipboard, switch view to plain text mode
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"
"Method "Path" with signature "s" on interface "org.test" doesn't exist"
To copy to clipboard, switch view to plain text mode
So the question is how to send objectpath as an argument in dbus method?
-Sage
Bookmarks