diff generator/cppheadergenerator.cpp @ 257:17b5e13364b7 lifetime

(none)
author maxter
date Wed, 16 Sep 2009 13:56:02 +0000
parents 34a37904ff77
children 515d6e1c7b10
line wrap: on
line diff
--- a/generator/cppheadergenerator.cpp	Mon Aug 31 12:07:28 2009 +0000
+++ b/generator/cppheadergenerator.cpp	Wed Sep 16 13:56:02 2009 +0000
@@ -126,7 +126,7 @@
       << "#define " << include_block << endl << endl
 //      << "#include <qtjambi_core.h>" << endl
       << "#include <QtCore/QHash>" << endl
-      << "#include <QObjectEntity.h>" << endl;
+      << "#include <qtd_core.h>" << endl;
 
     Include inc = java_class->typeEntry()->include();
     s << "#include ";
@@ -180,7 +180,7 @@
       << " : public " << java_class->qualifiedCppName();
     if (java_class->isQObject())
         s << ", public QtD_QObjectEntity";
-    else if(java_class->hasVirtualFunctions())
+    else if (java_class->hasVirtualFunctions())
         s << ", public QtD_Entity";
     s << endl  << "{" << endl;
 
@@ -207,9 +207,10 @@
         if (function->isConstructor() && !function->isPrivate())
             writeFunction(s, function);
     }
-
-    s << "    ~" << shellClassName(java_class) << "();" << endl;
-    s << endl;
+    
+    if (java_class->hasVirtualFunctions())
+        s << "    ~" << shellClassName(java_class) << "();" << endl << endl;
+    
 
     // All functions in original class that should be reimplemented in shell class
     AbstractMetaFunctionList shell_functions = java_class->functionsInShellClass();