Web lists-archives.com

D-Bus signal parameter and incorrect xml generation

Hey !

I'm trying to pass a QVariantMap as a D-Bus signal parameter so that the intended application gets the updated data every time that signal is emitted.

I have a class A, in which I have a Q_SIGNAL, as:

void update(QVariantMap map)

Inside CMakeLists.txt, I call qt5_generate_dbus_interface with OPTIONS -M -S
The generated XML snippet is something like this :- 

    <signal name="update">
      <arg name="map" type="a{sv}" direction="out"/>
      <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>

Further in CMake, I do a qt5_add_dbus_adaptor on the generated xml file. On compilation, I get the following error although (and make fails):

" You should add <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="<type>"/> to the XML description "

(Notice the In0 and Out0 in the two annotations)

Now, I proceeded and did what the compilation error said, and changed the annotation accordingly in the signal. And everything worked.

Does anyone have an idea, what's happening ? And why it's happening ? Should I just use this xml file as such, instead of generating it during make ?