wintermute-devel team mailing list archive
-
wintermute-devel team
-
Mailing list archive
-
Message #00433
[Bug 864318] Re: Unable to expose user-defined data types over D-Bus
Well, a code snippet of how the implementation would typically works
according to QtDBus's documentation would be the following (currently in
the linguistics code branch [lp:~wintermute-devel/wintermute/ling] in
file syntax.cpp on lines 141 - 146; however it's been modified below for
verbose explanation).
/// Not found in the code; but calling it handles an issue that should have been fixed (user-defined type not marshalled).
qDBusRegisterMetaType<Lexical::Data>();
/// The data to send over DBus.
Lexical::Data l_dt(p_id,p_lcl);
/// Converted to a QVariant for simplified transfer (this might be the issue, but I doubt it).
QVariant l_vrnt = QVariant::fromValue(l_dt);
/// Form the method call for D-Bus.
QDBusMessage l_call = QDBusMessage::createMethodCall ("org.thesii.Wintermute.Data","/Nodes","org.thesii.Wintermute.Data.NodeAdaptor","exists");
/// Load the argument call.
l_call << l_vrnt;
qDebug() << "(ling) [Node] <exists>" << p_lcl;
/// Execute the call and obtain a reply.
QDBusMessage l_reply = QDBusConnection::sessionBus ().call(l_call,QDBus::BlockWithGui);
With this is run, the following is printed out as an non-critical error by Wintermute:
(data) [Node] Unable to determine existance of
"1a699ad5e06aa8a6db3bcf9cfb2f00f2" "en" : "No such method 'exists' in
interface 'org.thesii.Wintermute.Data.NodeAdaptor' at object path
'/Nodes' (signature '(ssa{ss}s)')"
This is because the data library seems to not either not call
qDBusRegisterMetaType from System::start() in time, or that maybe the
custom types need to have their own introspection for D-Bus. Either way,
I'm stumped.
--
You received this bug notification because you are a member of
Wintermute Developers, which is subscribed to Wintermute.
https://bugs.launchpad.net/bugs/864318
Title:
Unable to expose user-defined data types over D-Bus
Status in Wintermute:
New
Bug description:
Wintermute's self-defined data types for D-Bus usage aren't properly
serialized.
When attempting to call a method; however, it causes null information
to be returned and thus breaking the linguistics system.
To manage notifications about this bug go to:
https://bugs.launchpad.net/wintermute/+bug/864318/+subscriptions
References