I’m programming C++ on Ubuntu, using QDBus and I’ve got the following code snippet:
this->m_cRemoteInterface = new QDBusInterface("org.my.service", "/data", "org.freedesktop.DBus.Properties.Get");
QDBusReply<uint64_t> cResult = m_cRemoteInterface->call("property1");
The code throws the following error:
org.freedesktop.DBus.Error.UnknownMethod:
Method “property1” with
signature “” on interface
“org.freedesktop.DBus.Properties.Get”
doesn’t exist
But when I issue the following command in a shell, it returns the correct value:
dbus org.my.service /data org.freedesktop.DBus.Properties.Get ”
” property1
What could I do wrong?
Thanks in advance, emi
After an afternoon of trail and error:
I declared
as interface, which is not right.
I had to use only
as interface and then
May this help someone. :).