diff generator/dgenerator.cpp @ 361:beaf4a2974d7

Autogeneration of QMetaType. First attempts at fixing qRegisterMetaType etc
author Max Samukha <maxter@maxter.com>
date Wed, 09 Jun 2010 11:08:56 +0300
parents a3f5c10414f3
children 3b0545d4d479
line wrap: on
line diff
--- a/generator/dgenerator.cpp	Thu Jun 03 10:12:29 2010 +0300
+++ b/generator/dgenerator.cpp	Wed Jun 09 11:08:56 2010 +0300
@@ -1726,9 +1726,9 @@
 
 void DGenerator::writeFlagsSetter(QTextStream &s, const AbstractMetaClass *d_class)
 {
-    if (d_class->isInterface() || d_class->isNamespace())
+    if (d_class->isInterface())
         s << INDENT << "void __setFlags(QtdObjectFlags flags, bool val);";
-    else // COMPILER BUG:
+    else if (!d_class->isNamespace()) // COMPILER BUG:
         s << INDENT << "void __setFlags(QtdObjectFlags flags, bool val) { super.__setFlags(flags, val); }";
 }
 
@@ -1844,7 +1844,8 @@
     auxFile.isDone = true;
     auxFile.stream << "module " << auxModName << ";" << endl << endl;
 
-    bool staticInit = d_class->isQObject() || d_class->typeEntry()->isValue() || (cpp_shared && d_class->generateShellClass() && !d_class->isInterface());
+    bool staticInit = d_class->isQObject() || d_class->typeEntry()->isValue()
+                      || (cpp_shared && d_class->generateShellClass() && !d_class->isInterface() && !d_class->isNamespace());
     if (staticInit)
     {
         auxFile.isDone = false;