bc23ccde | 2019-06-28 16:20:01 | Emanoil Kotsev |
Fix for issue 11 based on latest master Signed-off-by: Emanoil Kotsev <deloptes@...> |
||
M src/tools/dbusxml2qt3/methodgen.cpp |
||
src/tools/dbusxml2qt3/methodgen.cppdiff --git a/src/tools/dbusxml2qt3/methodgen.cpp b/src/tools/dbusxml2qt3/methodgen.cpp index 89c3677..882c1cd 100644 --- a/src/tools/dbusxml2qt3/methodgen.cpp +++ b/src/tools/dbusxml2qt3/methodgen.cpp @@ -457,7 +457,6 @@ if (firstArgument) { firstArgument = false; - stream << " TQDomElement argumentElement = document.createElement(" << "\"arg\");" << endl; } @@ -537,6 +536,7 @@ stream << "}" << endl; stream << endl; } + static void writeNodeIntrospection(const Class& classData, const TQValueList<Class>& interfaces, TQTextStream& stream) { @@ -607,10 +607,6 @@ method.noReply = false; method.async = hasAnnotation(element, "org.freedesktop.DBus.GLib.Async"); classData.methods.append(method); - if (method.async) { - method.async = false; - classData.methods.append(method); - } } else if (element.tagName() == "signal") { @@ -1680,6 +1676,7 @@ bool firstMethod = true; bool firstArgument = true; + bool firstAsync = true; TQValueList<Method>::const_iterator it = classData.methods.begin(); TQValueList<Method>::const_iterator endIt = classData.methods.end(); @@ -1699,6 +1696,23 @@ << "\"method\");" << endl; } + if ((*it).async) + { + if (firstAsync) { + firstAsync=false; + stream << " TQDomElement asyncAnnotationElement = document.createElement(" + << "\"annotation\");" << endl; + } + else + { + stream << " asyncAnnotationElement = document.createElement(" + << "\"annotation\");" << endl; + } + stream << " asyncAnnotationElement.setAttribute(\"name\", " + << "\"org.freedesktop.DBus.GLib.Async\");" << endl; + stream << " methodElement.appendChild(asyncAnnotationElement);" << endl; + } + writeMethodIntrospection(*it, firstArgument, stream); stream << " interfaceElement.appendChild(methodElement);" << endl; |
||
1738aa06 | 2019-06-28 19:36:41 | Emanoil Kotsev |
Fix regression from recent signals and async changes Signed-off-by: Emanoil Kotsev <deloptes@...> |
||
M src/tools/dbusxml2qt3/classgen.cpp |
||
src/tools/dbusxml2qt3/classgen.cppdiff --git a/src/tools/dbusxml2qt3/classgen.cpp b/src/tools/dbusxml2qt3/classgen.cpp index b8e6040..0954e7c 100644 --- a/src/tools/dbusxml2qt3/classgen.cpp +++ b/src/tools/dbusxml2qt3/classgen.cpp @@ -681,7 +681,11 @@ case Class::Proxy: stream << "signals:" << endl; - stream << " void AsyncErrorResponseDetected(int asyncCallId, const TQT_DBusError error);" << endl << endl; + if (!classData.asyncReplySignals.isEmpty()) + { + stream << " void AsyncErrorResponseDetected(int asyncCallId, " + << "const TQT_DBusError error);" << endl << endl; + } prefix = " void "; break; |
||
6bead3d3 | 2019-06-29 16:56:27 | Emanoil Kotsev |
Fix problem with d-feet and annotation missing value attribute Signed-off-by: Emanoil Kotsev <deloptes@...> |
||
M src/tools/dbusxml2qt3/methodgen.cpp |
||
src/tools/dbusxml2qt3/methodgen.cppdiff --git a/src/tools/dbusxml2qt3/methodgen.cpp b/src/tools/dbusxml2qt3/methodgen.cpp index 882c1cd..a7e3427 100644 --- a/src/tools/dbusxml2qt3/methodgen.cpp +++ b/src/tools/dbusxml2qt3/methodgen.cpp @@ -1710,6 +1710,8 @@ } stream << " asyncAnnotationElement.setAttribute(\"name\", " << "\"org.freedesktop.DBus.GLib.Async\");" << endl; + stream << " asyncAnnotationElement.setAttribute(\"value\", " + << "\"true\");" << endl; stream << " methodElement.appendChild(asyncAnnotationElement);" << endl; } |