Fix #23 dbusxml2qt3 with multiple interfaces

Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
pull/24/head
Emanoil Kotsev 4 years ago
parent 651c4a912d
commit 45bdbff13b
No known key found for this signature in database
GPG Key ID: F1EEB8CD9FB16A50

@ -553,6 +553,7 @@ static void writeNodeIntrospection(const Class& classData,
stream << "{" << endl;
stream << " TQDomDocument doc;" << endl;
stream << " TQDomElement interfaceElement;" << endl;
stream << " TQDomElement nodeElement = doc.createElement(\"node\");" << endl;
stream << " if (!objectPath.isEmpty() && objectPath.compare(\"/\") != 0)" << endl;
stream << " {" << endl;
@ -560,7 +561,7 @@ static void writeNodeIntrospection(const Class& classData,
stream << " }" << endl;
stream << " // Introspectable is added by default. Show it only if there is interface" << endl;
stream << " if (interfaces.count()>1) {" << endl;
stream << " TQDomElement interfaceElement = doc.createElement(\"interface\");"
stream << " interfaceElement = doc.createElement(\"interface\");"
<< endl;
stream << " org::freedesktop::DBus::IntrospectableInterface"
<< "::buildIntrospectionData(interfaceElement);" << endl;
@ -574,7 +575,7 @@ static void writeNodeIntrospection(const Class& classData,
if ((*it).dbusName == "org.freedesktop.DBus.Introspectable") continue;
stream << endl;
stream << " TQDomElement interfaceElement = doc.createElement(\"interface\");"
stream << " interfaceElement = doc.createElement(\"interface\");"
<< endl;
stream << " " << (*it).namespaces.join("::") + "::" + (*it).name
<< "Interface::buildIntrospectionData(interfaceElement);" << endl;

Loading…
Cancel
Save