summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tools/dbusxml2qt3/methodgen.cpp24
1 files changed, 19 insertions, 5 deletions
diff --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 @@ static void writeMethodIntrospection(const Method& method, bool& firstArgument,
if (firstArgument)
{
firstArgument = false;
-
stream << " TQDomElement argumentElement = document.createElement("
<< "\"arg\");" << endl;
}
@@ -537,6 +536,7 @@ static void writeNodeInitialization(const Class& classData,
stream << "}" << endl;
stream << endl;
}
+
static void writeNodeIntrospection(const Class& classData,
const TQValueList<Class>& interfaces, TQTextStream& stream)
{
@@ -607,10 +607,6 @@ bool MethodGenerator::extractMethods(const TQDomElement& interfaceElement,
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 @@ void MethodGenerator::writeIntrospectionDataMethod(const Class& classData,
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 @@ void MethodGenerator::writeIntrospectionDataMethod(const Class& classData,
<< "\"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;