2012-09-21 35 views
0

我正在使用Qt在Linux构建机器上扩展DBus接口。现有的接口工作正常,我需要添加另一个参数qdbusxml2cpp的参数的最大数量

的XML生成方法生成是:

<method name="get_card_info"> 
    <arg type="b" name="success" direction="out" />  
    <arg type="s" name="version" direction="out" /> 
    <arg type="s" name="serial" direction="out" /> 
    <arg type="s" name="BeginDate" direction="out" /> 
    <arg type="s" name="ExpirationDate" direction="out" /> 
    <arg type="s" name="RenewalDate" direction="out" /> 
    <arg type="s" name="ZipCode" direction="out" /> 
    <arg type="s" name="ZipCodeExtension" direction="out" /> 
    <!-- <arg type="u" name="cardStatus" direction="out" /> --> 
</method> 

代码工作正常,直到我去掉注释掉线,在这一点qdbusxml2cpp报告:

interface_dbus_p.h:39:103: error: wrong number of template arguments (9, should be 8) 

这是即使我注释掉所有对此函数的调用;事实上,这是在链接代码被编译之前;这是全部来自qdbusxml2cpp调用。

如果我将其更改为六个,七个或八个项目,则XML将进行编译,但如果将其增加到九个,它将崩溃。

我没有更改除XML代码之外的其他配置文件。

怎么了?是否有八个参数的限制?

回答

0

找到它;是有一定限度的,这要归功于QDBusPendingReply

“的QDBusPendingReply是一个具有多达8个模板参数的模板类。这些参数是将被用于提取回复的数据内容的类型。”

所以对我来说不超过8个参数:(