diff options
-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; } |