diff options
author | renato araujo oliveira <renato@renato-note.(none)> | 2009-11-03 17:10:08 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-03 20:25:04 -0200 |
commit | 030df87352ace61c7bad697ece1aa691215c20ea (patch) | |
tree | 7d421c184a7897c9334605bb05256669cdf750c4 /headergenerator.cpp | |
parent | 90df25280525d86d110f40906153197258b7bd1a (diff) |
Skip generation of unecessary wrapper classes.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r-- | headergenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp index a8949a59a..ab5e563cf 100644 --- a/headergenerator.cpp +++ b/headergenerator.cpp @@ -56,8 +56,8 @@ void HeaderGenerator::generateClass(QTextStream& s, const AbstractMetaClass* met QString wrapperName = HeaderGenerator::wrapperName(metaClass); // Header - s << "#ifndef " << wrapperName.toUpper() << "_H" << endl; - s << "#define " << wrapperName.toUpper() << "_H" << endl<< endl; + s << "#ifndef SBK_" << wrapperName.toUpper() << "_H" << endl; + s << "#define SBK_" << wrapperName.toUpper() << "_H" << endl<< endl; if (!metaClass->isNamespace() && !metaClass->hasPrivateDestructor()) { s << "// The mother of all C++ binding hacks!" << endl; @@ -73,7 +73,7 @@ void HeaderGenerator::generateClass(QTextStream& s, const AbstractMetaClass* met writeCodeSnips(s, metaClass->typeEntry()->codeSnips(), CodeSnip::Declaration, TypeSystem::NativeCode); - if (!metaClass->isNamespace() && !metaClass->hasPrivateDestructor()) { + if (metaClass->isPolymorphic() && !metaClass->isNamespace() && !metaClass->hasPrivateDestructor()) { /* * BOTOWTI (Beast of The Old World to be Investigated) // detect the held type @@ -112,7 +112,7 @@ void HeaderGenerator::generateClass(QTextStream& s, const AbstractMetaClass* met s << "};" << endl << endl; } - s << "#endif // " << wrapperName.toUpper() << "_H" << endl << endl; + s << "#endif // SBK_" << wrapperName.toUpper() << "_H" << endl << endl; } void HeaderGenerator::writeFunction(QTextStream& s, const AbstractMetaFunction* func) const |