【问题标题】:How to add the header in autogenerated bindings code by qdbusxml2cpp?如何通过 qdbusxml2cpp 在自动生成的绑定代码中添加标头?
【发布时间】:2014-03-25 13:38:17
【问题描述】:

$qdbusxml2cpp -v -c CustomIf -p customif.h:customif.cpp org.item.custom.xml

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添加包含。

【问题讨论】:

  • $ qdbusxml2cpp -c CustomIfAdaptor -a -i customifadaptor.h:customifadaptor.cpp org.pace.custom.xml 在这个命令中,在哪里添加message.h

标签: qt qtdbus qdbusxml2cpp


【解决方案1】:

使用以下选项:

-i <filename> Add #include to the output

所以,这将是相应的命令:

qdbusxml2cpp -v -i message.h -c CustomIf -p customif.h:customif.cpp org.item.custom.xml

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-29
    • 2012-12-15
    • 1970-01-01
    • 2016-05-21
    • 2016-06-09
    相关资源
    最近更新 更多