Hi,

I'm trying to call dbus method where DBusObjectPath is the argument.

The method is defined as following:
Qt Code:
  1. ...
  2. <method name="Path">
  3. <arg type="o" direction="in" name="path" />
  4. </method>
  5. ...
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. ...
  2. QDBusObjectPath objectpath("/mypath");
  3. ((QDBusInterface*)iface)->call("Path",objectpath);
  4. ...
To copy to clipboard, switch view to plain text mode 
With the code above compiler returns following error:
Qt Code:
  1. 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.
Qt Code:
  1. ...
  2. QDBusObjectPath objectpath("/mypath");
  3. ((QDBusInterface*)iface)->call("Path",objectpath.path());
  4. ...
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.
Qt Code:
  1. "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