diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-04-30 01:04:39 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-04-30 01:04:39 +0900 |
commit | 415cca8630022e155ce159696ece272a6661ddc5 (patch) | |
tree | 2a34da4586093d38d38cd4a1c69b3a6ad8df9191 /src/tools | |
parent | 318a0abf7f676ab36f0935c4881f67e52735a664 (diff) | |
download | dbus-1-tqt-415cca8630022e155ce159696ece272a6661ddc5.tar.gz dbus-1-tqt-415cca8630022e155ce159696ece272a6661ddc5.zip |
Fixed previous commit. The name of the included moc file needs to be taken from the specified basename when available. The location of
the function call was also wrong.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/dbusxml2qt3/classgen.cpp | 15 | ||||
-rw-r--r-- | src/tools/dbusxml2qt3/classgen.h | 1 | ||||
-rw-r--r-- | src/tools/dbusxml2qt3/main.cpp | 4 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/tools/dbusxml2qt3/classgen.cpp b/src/tools/dbusxml2qt3/classgen.cpp index 910989a..7ca39a1 100644 --- a/src/tools/dbusxml2qt3/classgen.cpp +++ b/src/tools/dbusxml2qt3/classgen.cpp @@ -102,12 +102,6 @@ static void closeNamespaces(const TQStringList& namespaces, TQTextStream& stream } } -static void writeIncludeMoc(const TQString& className, TQTextStream& stream) -{ - stream << "#include \"" << className.lower() << "Proxy.moc\"" << endl; - stream << endl; -} - static void writeIncludes(const TQString& description, const TQStringList& includes, TQTextStream& stream) { @@ -1062,8 +1056,6 @@ bool ClassGenerator::generateProxy(const Class& classData, closeNamespaces(classDataCopy.namespaces, sourceStream); - writeIncludeMoc(classData.name, sourceStream); - return true; } @@ -1098,4 +1090,11 @@ bool ClassGenerator::generateNode(const Class& classData, return true; } +bool ClassGenerator::generateIncludeMoc(const TQString& baseName, TQTextStream& stream) +{ + stream << "#include \"" << baseName << ".moc\"" << endl; + stream << endl; + return true; +} + // End of File diff --git a/src/tools/dbusxml2qt3/classgen.h b/src/tools/dbusxml2qt3/classgen.h index 3597890..1abb893 100644 --- a/src/tools/dbusxml2qt3/classgen.h +++ b/src/tools/dbusxml2qt3/classgen.h @@ -47,6 +47,7 @@ public: static bool generateNode(const Class& classData, const TQValueList<Class>& interfaces, TQTextStream& headerStream, TQTextStream& sourceStream); + static bool generateIncludeMoc(const TQString& baseName, TQTextStream& sourceStream); }; #endif diff --git a/src/tools/dbusxml2qt3/main.cpp b/src/tools/dbusxml2qt3/main.cpp index ad54291..0f19dc5 100644 --- a/src/tools/dbusxml2qt3/main.cpp +++ b/src/tools/dbusxml2qt3/main.cpp @@ -264,13 +264,17 @@ int main(int argc, char** argv) if (baseName.isEmpty()) { + ClassGenerator::generateIncludeMoc((*it).name.lower() + "Proxy", sourceStream); ClassGenerator::finishStreams((*it).name.lower() + "Proxy", headerStream, sourceStream); } } if (!baseName.isEmpty()) + { + ClassGenerator::generateIncludeMoc(baseName, sourceStream); ClassGenerator::finishStreams(baseName, headerStream, sourceStream); + } } if (generateNode || generateAll) |