From bb8f8a28271c8c730e94c77afeb32e24e08c1c17 Mon Sep 17 00:00:00 2001 From: Emanoil Kotsev Date: Sun, 28 Apr 2019 00:54:52 +0900 Subject: dd node name if not a root node. Signed-off-by: Emanoil Kotsev Signed-off-by: Michele Calgaro --- src/tools/dbusxml2qt3/methodgen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tools/dbusxml2qt3/methodgen.cpp b/src/tools/dbusxml2qt3/methodgen.cpp index 4e407d5..3ba914e 100644 --- a/src/tools/dbusxml2qt3/methodgen.cpp +++ b/src/tools/dbusxml2qt3/methodgen.cpp @@ -541,6 +541,10 @@ static void writeNodeIntrospection(const Class& classData, stream << " TQDomDocument doc;" << endl; stream << " TQDomElement nodeElement = doc.createElement(\"node\");" << endl; + stream << " if ( !objectPath.isEmpty() && objectPath.compare(\"/\") != 0 )" << endl; + stream << " {" << endl; + stream << " nodeElement.setAttribute ( \"name\", objectPath );" << endl; + stream << " }" << endl; stream << " TQDomElement interfaceElement = doc.createElement(\"interface\");" << endl; stream << " org::freedesktop::DBus::Introspectable" -- cgit v1.2.3