Fix for issue #11

Emanoil Kotsev 5 years ago committed by Slávek Banko
parent 0eb4d56f03
commit 0321c2e829
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -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;

Loading…
Cancel
Save