|
|
@ -143,8 +143,8 @@ int main(int argc, char** argv)
|
|
|
|
|
|
|
|
|
|
|
|
if (checkForOption(options, "classname"))
|
|
|
|
if (checkForOption(options, "classname"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// class name only useful for single interfaces or just node
|
|
|
|
// class name only useful for single interfaces or node
|
|
|
|
if (interfaces.count() > 1 && (generateAll || generateInterfaces || generateProxies))
|
|
|
|
if (interfaces.count() > 1 && !(generateNode || generateAll))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::cerr << "dbusxml2qt3: class name option specified but "
|
|
|
|
std::cerr << "dbusxml2qt3: class name option specified but "
|
|
|
|
<< "introspection data file '"
|
|
|
|
<< "introspection data file '"
|
|
|
@ -155,7 +155,7 @@ int main(int argc, char** argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// class name for node is handled differently later on
|
|
|
|
// class name for node is handled differently later on
|
|
|
|
if (!generateNode)
|
|
|
|
if (!(generateNode || generateAll))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQStringList nameParts = TQStringList::split("::", options["classname"]);
|
|
|
|
TQStringList nameParts = TQStringList::split("::", options["classname"]);
|
|
|
|
|
|
|
|
|
|
|
@ -215,7 +215,10 @@ int main(int argc, char** argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Class interfaceData = *it;
|
|
|
|
Class interfaceData = *it;
|
|
|
|
interfaceData.name += "Interface";
|
|
|
|
if(!checkForOption(options, "classname") || generateNode || generateAll)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
interfaceData.name += "Interface";
|
|
|
|
|
|
|
|
}
|
|
|
|
ClassGenerator::generateInterface(interfaceData, headerStream, sourceStream);
|
|
|
|
ClassGenerator::generateInterface(interfaceData, headerStream, sourceStream);
|
|
|
|
|
|
|
|
|
|
|
|
if (baseName.isEmpty())
|
|
|
|
if (baseName.isEmpty())
|
|
|
@ -264,7 +267,10 @@ int main(int argc, char** argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Class proxyData = *it;
|
|
|
|
Class proxyData = *it;
|
|
|
|
proxyData.name += "Proxy";
|
|
|
|
if(!checkForOption(options, "classname") || generateNode || generateAll)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
proxyData.name += "Proxy";
|
|
|
|
|
|
|
|
}
|
|
|
|
ClassGenerator::generateProxy(proxyData, headerStream, sourceStream);
|
|
|
|
ClassGenerator::generateProxy(proxyData, headerStream, sourceStream);
|
|
|
|
|
|
|
|
|
|
|
|
if (baseName.isEmpty())
|
|
|
|
if (baseName.isEmpty())
|
|
|
@ -287,10 +293,9 @@ int main(int argc, char** argv)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tqDebug("Generating org.freedesktop.DBus.Introspectable on demand");
|
|
|
|
tqDebug("Generating org.freedesktop.DBus.Introspectable on demand");
|
|
|
|
|
|
|
|
|
|
|
|
TQString baseClassName = "Introspectable";
|
|
|
|
|
|
|
|
TQString streamName = baseClassName.lower() + "Interface";
|
|
|
|
|
|
|
|
Class classData;
|
|
|
|
Class classData;
|
|
|
|
classData.name = baseClassName + "Interface";
|
|
|
|
TQString streamName = "introspectableInterface";
|
|
|
|
|
|
|
|
classData.name = "IntrospectableInterface";
|
|
|
|
classData.dbusName = "org.freedesktop.DBus.Introspectable";
|
|
|
|
classData.dbusName = "org.freedesktop.DBus.Introspectable";
|
|
|
|
|
|
|
|
|
|
|
|
classData.namespaces << "org" << "freedesktop" << "DBus";
|
|
|
|
classData.namespaces << "org" << "freedesktop" << "DBus";
|
|
|
@ -368,6 +373,9 @@ int main(int argc, char** argv)
|
|
|
|
TQString baseName = options["node"];
|
|
|
|
TQString baseName = options["node"];
|
|
|
|
if (baseName.isEmpty()) {
|
|
|
|
if (baseName.isEmpty()) {
|
|
|
|
baseName = classData.name.lower() + "Node";
|
|
|
|
baseName = classData.name.lower() + "Node";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!checkForOption(options, "classname"))
|
|
|
|
|
|
|
|
{
|
|
|
|
classData.name += "Node";
|
|
|
|
classData.name += "Node";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|