0

Using C++/QtDBus. I'm trying to get a reply from DBus call to function described as:

object, dict PullAll(string targetfile, dict filters).

I registered (qDBusRegisterMetaType) a type defined as: typedef QPair< QDBusObjectPath, QVariantMap > Transfer; In QDBusPendingCallWatcher handler I'm doing:

QDBusPendingReply<Transfer> reply = *pwatcher;

I get an error:

Unexpected reply signature: got "oa{sv}", expected "(oa{sv})"

What's wrong? What is parentheses in "(oa{sv})"?

1 Answers1

1

I think the whole message needs to be wrapped in a struct. At least you have the proper signature otherwise and are getting a response.

arrays: []
dict entries: {}
structs: ()

I'm not that familiar with QtDbus, but looking at the page for the QDbusArgument Class, you might have to do something like this:

argument.beginStructure();
argument << mystruct.objectpath << mystruct.array;
argument.endStructure();
MrUser
  • 1,187
  • 15
  • 25