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 interfaces, { stream << "// interface classes includes" << endl; - if (!customInterfaceFilename.isNull()) + if (!customInterfaceFilename.isEmpty()) { stream << "#include \"" << customInterfaceFilename << ".h\"" << endl; } - else + + bool hasIntrospectable = false; + TQValueList::const_iterator it = interfaces.begin(); + TQValueList::const_iterator endIt = interfaces.end(); + for (; it != endIt; ++it) { - bool hasIntrospectable = false; - TQValueList::const_iterator it = interfaces.begin(); - TQValueList::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; }