diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-05-26 00:16:39 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-05-26 00:16:39 +0200 |
commit | f08981e12a71624aea21350c419598695f819fc9 (patch) | |
tree | 805095442c2ceb5c3c8763c720b46b147283ca19 | |
parent | 97bfc41b1b0c96544c9cee3b95825b5e4e8abdb0 (diff) | |
download | dbus-1-tqt-f08981e12a71624aea21350c419598695f819fc9.tar.gz dbus-1-tqt-f08981e12a71624aea21350c419598695f819fc9.zip |
Fixed problem with missing include of introspectableInterface.h file in
generated node file in case the custom interface file name is used.
This relates to issue #17.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r-- | src/tools/dbusxml2qt3/classgen.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/tools/dbusxml2qt3/classgen.cpp b/src/tools/dbusxml2qt3/classgen.cpp index 9eacdf4..b8e6040 100644 --- a/src/tools/dbusxml2qt3/classgen.cpp +++ b/src/tools/dbusxml2qt3/classgen.cpp @@ -369,29 +369,31 @@ static void writeInterfaceIncludes(const TQValueList<Class> interfaces, { stream << "// interface classes includes" << endl; - if (!customInterfaceFilename.isNull()) + if (!customInterfaceFilename.isEmpty()) { stream << "#include \"" << customInterfaceFilename << ".h\"" << endl; } - else + + bool hasIntrospectable = false; + TQValueList<Class>::const_iterator it = interfaces.begin(); + TQValueList<Class>::const_iterator endIt = interfaces.end(); + for (; it != endIt; ++it) { - bool hasIntrospectable = false; - TQValueList<Class>::const_iterator it = interfaces.begin(); - TQValueList<Class>::const_iterator endIt = interfaces.end(); - for (; it != endIt; ++it) + if (customInterfaceFilename.isEmpty()) { stream << "#include \"" << (*it).name.lower() << "Interface.h\"" << endl; - if ((*it).dbusName == "org.freedesktop.DBus.Introspectable") - { - hasIntrospectable = true; - } } - if (!hasIntrospectable) + if ((*it).dbusName == "org.freedesktop.DBus.Introspectable") { - stream << "#include \"introspectableInterface.h\"" << endl; + hasIntrospectable = true; } } + if (!hasIntrospectable) + { + stream << "#include \"introspectableInterface.h\"" << endl; + } + stream << endl; } |