Qt 如何在qdbusxml2cpp自动生成的绑定代码中添加头?
$qdbusxml2cpp-v-c CustomIf-p CustomIf.h:CustomIf.cpp org.item.custom.xmlQt 如何在qdbusxml2cpp自动生成的绑定代码中添加头?,qt,qtdbus,qdbusxml2cpp,Qt,Qtdbus,Qdbusxml2cpp,$qdbusxml2cpp-v-c CustomIf-p CustomIf.h:CustomIf.cpp org.item.custom.xml <node> <interface name="org.pace.custom"> <method name="Send_Custom_Msg"> <arg name="msg" type="a(ii)" direction="in"/> <annotation name="org.qtprojec
<node>
<interface name="org.pace.custom">
<method name="Send_Custom_Msg">
<arg name="msg" type="a(ii)" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Message"/>
</method>
<signal name="LateEvent">
<arg name="eventkind" type="s" direction="out"/>
</signal>
</interface>
</node>
org.item.custom.xml
<node>
<interface name="org.pace.custom">
<method name="Send_Custom_Msg">
<arg name="msg" type="a(ii)" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="Message"/>
</method>
<signal name="LateEvent">
<arg name="eventkind" type="s" direction="out"/>
</signal>
</interface>
</node>
如何在生成的适配器customif.h中添加header-message.h?我不想手动将其添加为#include“message.h”,但实际上希望qdbusxml2cpp添加该包含项。使用以下选项:
-i <filename> Add #include to the output
$qdbusxml2cpp-c CustomIfAdaptor-a-i CustomIfAdaptor.h:CustomIfAdaptor.cpp org.pace.custom.xml在此命令中,添加message.h的位置