PDA

View Full Version : about qt dbus custom struct type



wshn13
29th December 2011, 03:15
Hi,all:
I meet a serious problem about qt dbus data struct .I get a xml file ,then I would convert the xml to cpp and h files using qdbusxml2cpp.In the xml file ,there is a line of <arg name="arg1" type="a(iiiiisis)" direction="out"/>.In my types.h file I define a struct as
typedef struct
{
int a;
int b;
int c;
int d;
int e;
QString f;
int g;
QString h;
} QccMap;
Q_DECLARE_METATYPE(QccMap)

then add <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QccMap"/> to the xml file . Then I run qdbusxml2cpp -p audiogateway.h:audiogateway.cpp -i types.h ../xml/audiogateway.xml .But I can't use the QueryCurrentCall to get a QccMap ,a error occur. 72087208,I attach my xml file .
Thanks !

wshn13
4th January 2012, 03:55
no suggestion?

ChrisW67
4th January 2012, 04:05
What error? The method is "QueryCurrentCalls" not "QueryCurrentCall".

wshn13
4th January 2012, 05:35
What error? The method is "QueryCurrentCalls" not "QueryCurrentCall".
I can't get the QueryCurrentCalls return value, because of the data type error.

ChrisW67
4th January 2012, 05:43
I can't get the QueryCurrentCalls return value, because of the data type error.
What error? Share it and the code that generates it with us. Otherwise we could keep guessing forever.

wshn13
4th January 2012, 05:48
What error? Share it and the code that generates it with us. Otherwise we could keep guessing forever.
Well ,thanks,I will generates the error again ,then post it here.