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>
pull/22/head
Slávek Banko 6 years ago
parent 97bfc41b1b
commit f08981e12a
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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;
}

Loading…
Cancel
Save