Em Segunda-feira 16 Fevereiro 2009, às 12:27:35, [email protected] escreveu: > There is a bug in the qdbusxml2cpp compiler: it does not handle signals > correctly (IMHO). > > The issue is that signal "out" arguments are treated as "in" arguments, > meaning that objects and structs are passed as bit-copies not references - > this is particularly annoying if using user defined types.
Hi Ronan,
That is task 222743 and I have known it for some time.
> Please, correct me if I am wrong.
That is not correct. Signals in D-Bus have only one direction ("out", from the
emitting application and onto the bus), so the annotation is technically
unnecessary. Unfortunately, instead of leaving it the default, the cpp2xml
compiler (not the xml2cpp one as you mention) outputs the wrong one.
However, besides that glitch, there should be no side-effect from the use.
Arguments are all handled the same way. The reason why this wasn't noticed
earlier is that the direction argument is ignored when processing the XML.
> The fix to the compiler (qbusxml2cpp.cpp - Qt-4.5.0-rc1) would be:
>
> 730 QStringList argNames = makeArgNames(signal.outputArgs);
> 731 writeArgList(hs, argNames, signal.annotations,
> QDBusIntrospection::Arguments(), signal.outputArgs);
>
> And
>
> 1073 QStringList argNames = makeArgNames(signal.outputArgs);
> 1074 writeArgList(hs, argNames, signal.annotations,
> QDBusIntrospection::Arguments(), signal.outputArgs);
I remember inspecting the code and I don't think it was such a simple
solution. Which is why I postponed it until later and haven't fixed it yet.
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
