[Interest] Question about using QtDBus
Thiago Macieira
thiago.macieira at intel.com
Thu Aug 28 20:23:07 CEST 2014
On Thursday 28 August 2014 17:17:54 Rogers Nate wrote:
> I have a data process where I am trying to store my data so it can be
> updated/retrieved from different processes. I am trying to get a QList
> of a custom object to be returned from the data object so it can be used
> by my CAN communication object. I have striped down some code to give
> an example of what I am trying to do. I have been trying to get this to
> work for awhile but I must be missing something and I am not fully
> understanding what needs to be done. I am thinking it has something to
> do with my dbus type, I feel like the xml file should define it as a(ss)
> but it won't compile with that and gives no meaningful information as to
> why. If I change it to ao it will compile but no data is available over
> in the CAN comm process and it prints an error saying it expected a(ss)
> before killing the process. Any help is greatly appreciated, thanks!
Hi Nate
I don't see any qDBusRegisterMetaType. You need to tell D-Bus how to marshall
your returned type when you return it. Make sure you call that before the
function returns -- better yet, in the constructor.
> #include <qt5/QtDBus/QtDBus>
Please don't include Qt headers like that. The correct way is <QtDBus/QtDBus>.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list