|
|
|
@ -682,10 +682,10 @@ bool MethodGenerator::extractMethods(const TQDomElement& interfaceElement,
|
|
|
|
|
|
|
|
|
|
if (element.tagName() == "method")
|
|
|
|
|
{
|
|
|
|
|
method.async = hasAnnotation(element, "org.freedesktop.DBus.GLib.Async");
|
|
|
|
|
bool async = hasAnnotation(element, "org.freedesktop.DBus.GLib.Async");
|
|
|
|
|
classData.methods.append(method);
|
|
|
|
|
if (method.async) {
|
|
|
|
|
method.async = false;
|
|
|
|
|
if (async) {
|
|
|
|
|
method.async = true;
|
|
|
|
|
classData.methods.append(method);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1167,16 +1167,18 @@ void MethodGenerator::writeInterfaceMainMethod(const Class& classData,
|
|
|
|
|
TQValueList<Method>::const_iterator endIt = classData.methods.end();
|
|
|
|
|
for (; it != endIt; ++it)
|
|
|
|
|
{
|
|
|
|
|
stream << " if (message.member() == \"" << (*it).name << "\")" << endl;
|
|
|
|
|
stream << " {" << endl;
|
|
|
|
|
|
|
|
|
|
if ((*it).async)
|
|
|
|
|
{
|
|
|
|
|
stream << " if (message.member() == \"" << (*it).name << "Async\")" << endl;
|
|
|
|
|
stream << " {" << endl;
|
|
|
|
|
stream << " call" << (*it).name << "Async(message);" << endl;
|
|
|
|
|
stream << endl;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
stream << " if (message.member() == \"" << (*it).name << "\")" << endl;
|
|
|
|
|
stream << " {" << endl;
|
|
|
|
|
stream << " TQT_DBusMessage reply = call" << (*it).name
|
|
|
|
|
<< "(message);" << endl;
|
|
|
|
|
stream << " handleMethodReply(reply);" << endl;
|
|
|
|
|