aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-11-23 14:51:56 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 15:31:08 -0300
commitffa52e72c2b8cc5d7a6086d4a5a270eac91de8b9 (patch)
treea6e27226226e2291fc40b8ddd602b9b3683a722e /shibokengenerator.cpp
parente243cc91579f8df5e51518a5cfae75cc995d39ec (diff)
Added ShibokenGenerator::shouldGenerateCppWrapper(metaClass) method.
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r--shibokengenerator.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index 716097bfa..b40598579 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -180,9 +180,14 @@ QString ShibokenGenerator::translateTypeForWrapperMethod(const AbstractMetaType*
return result;
}
+bool ShibokenGenerator::shouldGenerateCppWrapper(const AbstractMetaClass* metaClass)
+{
+ return metaClass->isPolymorphic() && !metaClass->isNamespace() && !metaClass->hasPrivateDestructor();
+}
+
QString ShibokenGenerator::wrapperName(const AbstractMetaClass* metaClass)
{
- if (metaClass->isPolymorphic()) {
+ if (shouldGenerateCppWrapper(metaClass)) {
QString result = metaClass->name();
if (metaClass->enclosingClass()) // is a inner class
result.replace("::", "_");