diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-04-30 23:24:46 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-04-30 23:24:46 +0900 |
commit | d3ff70c037825a37a7c40f12955397ad063f91f7 (patch) | |
tree | 8ff95e15505cbedc4015e62dc5881c2127842a61 /src/tools/dbusxml2qt3/classgen.cpp | |
parent | 415cca8630022e155ce159696ece272a6661ddc5 (diff) | |
download | dbus-1-tqt-d3ff70c0.tar.gz dbus-1-tqt-d3ff70c0.zip |
Fixed problem with interface file name generation and inclusion. This
relates to #5.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools/dbusxml2qt3/classgen.cpp')
-rw-r--r-- | src/tools/dbusxml2qt3/classgen.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/tools/dbusxml2qt3/classgen.cpp b/src/tools/dbusxml2qt3/classgen.cpp index 7ca39a1..c410d45 100644 --- a/src/tools/dbusxml2qt3/classgen.cpp +++ b/src/tools/dbusxml2qt3/classgen.cpp @@ -365,15 +365,22 @@ static void writeSourceIncludes(const Class& classData, Class::Role role, } static void writeInterfaceIncludes(const TQValueList<Class> interfaces, - TQTextStream& stream) + const TQString& customInterfaceFilename, TQTextStream& stream) { stream << "// interface classes includes" << endl; - TQValueList<Class>::const_iterator it = interfaces.begin(); - TQValueList<Class>::const_iterator endIt = interfaces.end(); - for (; it != endIt; ++it) + if (!customInterfaceFilename.isNull()) + { + stream << "#include \"" << customInterfaceFilename << ".h\"" << endl; + } + else { - stream << "#include \"" << (*it).name.lower() << "Interface.h\"" << endl; + TQValueList<Class>::const_iterator it = interfaces.begin(); + TQValueList<Class>::const_iterator endIt = interfaces.end(); + for (; it != endIt; ++it) + { + stream << "#include \"" << (*it).name.lower() << "Interface.h\"" << endl; + } } stream << "#include \"introspectableInterface.h\"" << endl; @@ -1061,6 +1068,7 @@ bool ClassGenerator::generateProxy(const Class& classData, bool ClassGenerator::generateNode(const Class& classData, const TQValueList<Class>& interfaces, + const TQString& customInterfaceFilename, TQTextStream& headerStream, TQTextStream& sourceStream) { @@ -1075,7 +1083,7 @@ bool ClassGenerator::generateNode(const Class& classData, // create source writeSourceIncludes(classData, Class::Node, sourceStream); - writeInterfaceIncludes(interfaces, sourceStream); + writeInterfaceIncludes(interfaces, customInterfaceFilename, sourceStream); openNamespaces(classData.namespaces, sourceStream); |