April 18, 2012

JamesBrown147 JamesBrown147
Lab Rat
8 posts

using QVariantMap with dbus

 

Hi there!

I’m using the qdbus module and I’m quite happy with it. My plan was to use a QVariantMap as parameter and return type of a dbus function. The reason for this is because of the flexibility it offeres. I used the following example:

http://www.developer.nokia.com/Community/Wiki/QtDbus_quick_tutorial

Everything seems to work, but then I had another look at this:

http://qt-project.org/doc/qt-4.8/qdbustypesystem.html#the-type-system-in-use

It states:

Warning: You may not use any type that is not on the list above, including typedefs to the types listed. This also includes QList<QVariant> and QMap<QString,QVariant>.

Now I’m rather confused. Everything works fine with QVariantMap and there is even support in the automatic generation of sourcecode with qdbuscpp2xml and qdbusxml2cpp but the warning says the opposite.

Does anybody know if QVariantMap is allowed in this context and what the reason for this warning is?

0 replies

 
  ‹‹ Displaying Unicode Characters      How to cancel pending(unprocessed) emitted signals ››

You must log in to post a reply. Not a member yet? Register here!