[Interest] Problem with QDBusArgument unmarshalling (without sending via dbus).

Валерий Котов kotov.valery at gmail.com
Wed Aug 13 14:03:28 CEST 2014


Greetings everybody!

During writing some tests we faced a problem with unpacking QDBusArgument
in case the message was not really sent via dbus.
If we send custom type via dbus both marshaling and unmarshaling are
performed without any error.
But if make direct call (instead of calling via dbus) and try to unpack
QDBusArgument without sending it we get “QDBusArgument: read from a
write-only object” error and empty object as result of unpacking.

Actually, we're trying to perform something like the following:

QDBusArgument arg;
arg << customType;
QDBusVariant var = QDBusVariant(QVariant::fromValue(arg));
....
CustomType result;
var.variant().value<QDBusArgument>() >> result;

If we perform the actual dbus call unmarshalling performs correctly. If we
use direct call - the result contains empty value (default value).

Could you please if it is possible to “trick” Qt and perform unmarshaling
even if we do not send object via dbus?

Thank you for your support!

-- 
Sincerely yours,
Valery Kotov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140813/26d71ad8/attachment.html>


More information about the Interest mailing list