diff generator/dgenerator.cpp @ 14:5015aede8edd

insert() for QPolygons
author eldar
date Thu, 14 May 2009 15:53:32 +0000
parents e78566595089
children cf8a415f3f32
line wrap: on
line diff
--- a/generator/dgenerator.cpp	Thu May 14 15:04:16 2009 +0000
+++ b/generator/dgenerator.cpp	Thu May 14 15:53:32 2009 +0000
@@ -2376,6 +2376,19 @@
 */
     s << "}" << endl;
 
+    /* ---------------- injected free code ----------------*/
+    const ComplexTypeEntry *class_type = d_class->typeEntry();
+    Q_ASSERT(class_type);
+
+    CodeSnipList code_snips = class_type->codeSnips();
+    foreach (const CodeSnip &snip, code_snips) {
+        if (!d_class->isInterface() && snip.language == TypeSystem::TargetLangFreeCode) {
+            s << endl;
+            snip.formattedCode(s, INDENT);
+        }
+    }
+    /* --------------------------------------------------- */
+
     interfaces = d_class->interfaces();
     if (!interfaces.isEmpty()) {
         for (int i=0; i<interfaces.size(); ++i) {