From ff5fee9de2442a696cb1d4c66e621b6d8618bbbf Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 9 May 2019 15:39:44 +0900 Subject: Fixed generation of Introspectable interface file. This resolves #17. Signed-off-by: Michele Calgaro --- src/tools/dbusxml2qt3/classgen.cpp | 2 -- src/tools/dbusxml2qt3/main.cpp | 10 ++++++++-- src/tools/dbusxml2qt3/methodgen.cpp | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/tools/dbusxml2qt3/classgen.cpp b/src/tools/dbusxml2qt3/classgen.cpp index d4ca679..41bb576 100644 --- a/src/tools/dbusxml2qt3/classgen.cpp +++ b/src/tools/dbusxml2qt3/classgen.cpp @@ -383,8 +383,6 @@ static void writeInterfaceIncludes(const TQValueList interfaces, } } - stream << "#include \"introspectableInterface.h\"" << endl; - stream << endl; } diff --git a/src/tools/dbusxml2qt3/main.cpp b/src/tools/dbusxml2qt3/main.cpp index 15871dc..747af9e 100644 --- a/src/tools/dbusxml2qt3/main.cpp +++ b/src/tools/dbusxml2qt3/main.cpp @@ -116,9 +116,10 @@ int main(int argc, char** argv) if (ClassGenerator::extractClass(element, classData)) { if (classData.dbusName == "org.freedesktop.DBus.Introspectable") + { hasIntrospectable = true; - else - interfaces << classData; + } + interfaces << classData; } } } @@ -253,6 +254,11 @@ int main(int argc, char** argv) TQValueList::const_iterator endIt = interfaces.end(); for (; it != endIt; ++it) { + if ((*it).dbusName == "org.freedesktop.DBus.Introspectable") + { + continue; + } + TQString streamName = (*it).name.lower() + "Proxy"; if (baseName.isEmpty()) { diff --git a/src/tools/dbusxml2qt3/methodgen.cpp b/src/tools/dbusxml2qt3/methodgen.cpp index 4a03850..74a7f6c 100644 --- a/src/tools/dbusxml2qt3/methodgen.cpp +++ b/src/tools/dbusxml2qt3/methodgen.cpp @@ -519,6 +519,11 @@ static void writeNodeInitialization(const Class& classData, TQValueList::const_iterator endIt = interfaces.end(); for (; it != endIt; ++it) { + if ((*it).dbusName == "org.freedesktop.DBus.Introspectable") + { + continue; + } + stream << endl; stream << " name = \"" << (*it).dbusName << "\";" << endl; stream << " interface = createInterface(name);" << endl; -- cgit v1.2.1