diff --git a/src/tools/dbusxml2qt3/classgen.cpp b/src/tools/dbusxml2qt3/classgen.cpp index 95569d1..f7985ad 100644 --- a/src/tools/dbusxml2qt3/classgen.cpp +++ b/src/tools/dbusxml2qt3/classgen.cpp @@ -373,10 +373,10 @@ static void writeInterfaceIncludes(const TQValueList interfaces, TQValueList::const_iterator endIt = interfaces.end(); for (; it != endIt; ++it) { - stream << "#include \"" << (*it).name.lower() << "interface.h\"" << endl; + stream << "#include \"" << (*it).name.lower() << "Interface.h\"" << endl; } - stream << "#include \"introspectableinterface.h\"" << endl; + stream << "#include \"introspectableInterface.h\"" << endl; stream << endl; } diff --git a/src/tools/dbusxml2qt3/main.cpp b/src/tools/dbusxml2qt3/main.cpp index 2eed886..ad54291 100644 --- a/src/tools/dbusxml2qt3/main.cpp +++ b/src/tools/dbusxml2qt3/main.cpp @@ -201,7 +201,7 @@ int main(int argc, char** argv) { if (baseName.isEmpty()) { - if (!ClassGenerator::initStreams((*it).name.lower() + "interface", + if (!ClassGenerator::initStreams((*it).name.lower() + "Interface", headerStream, sourceStream)) { std::cerr << "dbusxml2qt3: interface files, using base name '" @@ -216,7 +216,7 @@ int main(int argc, char** argv) if (baseName.isEmpty()) { - ClassGenerator::finishStreams((*it).name.lower() + "interface", + ClassGenerator::finishStreams((*it).name.lower() + "Interface", headerStream, sourceStream); } } @@ -249,7 +249,7 @@ int main(int argc, char** argv) { if (baseName.isEmpty()) { - if (!ClassGenerator::initStreams((*it).name.lower() + "proxy", + if (!ClassGenerator::initStreams((*it).name.lower() + "Proxy", headerStream, sourceStream)) { std::cerr << "dbusxml2qt3: proxy files, using base name '" @@ -264,7 +264,7 @@ int main(int argc, char** argv) if (baseName.isEmpty()) { - ClassGenerator::finishStreams((*it).name.lower() + "proxy", + ClassGenerator::finishStreams((*it).name.lower() + "Proxy", headerStream, sourceStream); } } @@ -307,11 +307,11 @@ int main(int argc, char** argv) TQTextStream headerStream; TQTextStream sourceStream; - if (!ClassGenerator::initStreams(classData.name.lower() + "interface", + if (!ClassGenerator::initStreams(classData.name.lower() + "Interface", headerStream, sourceStream)) { std::cerr << "dbusxml2qt3: interface files, using base name '" - << classData.name.lower().local8Bit().data() << "interface" + << classData.name.lower().local8Bit().data() << "Interface" << "', could not be opened for writing" << std::endl; exit(4); @@ -320,7 +320,7 @@ int main(int argc, char** argv) ClassGenerator::generateInterface(classData, headerStream, sourceStream); - ClassGenerator::finishStreams(classData.name.lower() + "interface", + ClassGenerator::finishStreams(classData.name.lower() + "Interface", headerStream, sourceStream); } @@ -359,7 +359,7 @@ int main(int argc, char** argv) TQString baseName = options["node"]; if (baseName.isEmpty()) { - baseName = classData.name.lower() + "node"; + baseName = classData.name.lower() + "Node"; classData.name += "Node"; } diff --git a/src/tools/dbusxml2qt3/methodgen.cpp b/src/tools/dbusxml2qt3/methodgen.cpp index 3ba914e..91ba592 100644 --- a/src/tools/dbusxml2qt3/methodgen.cpp +++ b/src/tools/dbusxml2qt3/methodgen.cpp @@ -541,13 +541,13 @@ static void writeNodeIntrospection(const Class& classData, stream << " TQDomDocument doc;" << endl; stream << " TQDomElement nodeElement = doc.createElement(\"node\");" << endl; - stream << " if ( !objectPath.isEmpty() && objectPath.compare(\"/\") != 0 )" << endl; + stream << " if (!objectPath.isEmpty() && objectPath.compare(\"/\") != 0)" << endl; stream << " {" << endl; stream << " nodeElement.setAttribute ( \"name\", objectPath );" << endl; stream << " }" << endl; stream << " TQDomElement interfaceElement = doc.createElement(\"interface\");" << endl; - stream << " org::freedesktop::DBus::Introspectable" + stream << " org::freedesktop::DBus::IntrospectableInterface" << "::buildIntrospectionData(interfaceElement);" << endl; stream << " nodeElement.appendChild(interfaceElement);" << endl; @@ -866,13 +866,22 @@ void MethodGenerator::writeMethodCall(const Class& classData, stream << endl; stream << " error = TQT_DBusError::stdFailed(\""; - nsIt = classData.namespaces.begin(); + nsIt = classData.namespaces.begin(); for (; nsIt != nsEndIt; ++nsIt) { stream << *nsIt << "."; } - stream << classData.name << "." << method.name << " execution failed\");" + TQString interfaceStr("Interface"); + if (classData.name.endsWith(interfaceStr)) + { + stream << classData.name.left(classData.name.length() - interfaceStr.length()); + } + else + { + stream << classData.name; + } + stream << "." << method.name << " execution failed\");" << endl; stream << " }" << endl; stream << endl; @@ -1681,7 +1690,7 @@ void MethodGenerator::writeIntrospectionDataMethod(const Class& classData, void MethodGenerator::writeNodePrivate(const Class& classData, TQTextStream& stream) { stream << "class " << classData.name - << "::Private : public org::freedesktop::DBus::Introspectable" << endl; + << "::Private : public org::freedesktop::DBus::IntrospectableInterface" << endl; stream << "{" << endl; stream << "public:" << endl; stream << " virtual ~Private();" << endl;