# HG changeset patch # User maxter # Date 1273759864 -10800 # Node ID c887282e1590f16cac778a1ff4a88a2864d7f58e # Parent 4920ef9206fedc878ac29f74da415caa56c994b6 removed enum experiment leftover diff -r 4920ef9206fe -r c887282e1590 generator/dgenerator.cpp --- a/generator/dgenerator.cpp Thu May 13 16:39:41 2010 +0300 +++ b/generator/dgenerator.cpp Thu May 13 17:11:04 2010 +0300 @@ -288,10 +288,6 @@ void DGenerator::writeEnumAliases(QTextStream &s, const AbstractMetaEnum *d_enum) { - FlagsTypeEntry *flags = d_enum->typeEntry()->flags(); - if (flags) - s << INDENT << "alias " << d_enum->name() << " " << flags->targetLangName() << ";" << endl << endl; - const AbstractMetaEnumValueList &values = d_enum->values(); for (int i=0; itypeEntry(); - 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); - } - } + /* ---------------- 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(); @@ -2434,7 +2430,7 @@ QString hasShellFlag = d_class->generateShellClass() ? " | QtdObjectFlags.hasShell" : ""; s << INDENT << "public this(void* native_id, QtdObjectFlags flags = QtdObjectFlags.nativeOwnership) {" << endl << INDENT << " super(native_id, flags);" << endl << endl; - + s << INDENT << "}" << endl << endl; uint exclude_attributes = AbstractMetaAttributes::Native | AbstractMetaAttributes::Abstract; @@ -2902,14 +2898,14 @@ s << INDENT << "int signalSignature(int signalId, ref stringz signature) {" << endl; { Indentation indent(INDENT); - + if (d_class->name() != "QObject") { s << INDENT << "signalId = super.signalSignature(signalId, signature);" << endl << INDENT << "if (signature)" << endl - << INDENT << " return signalId;" << endl; + << INDENT << " return signalId;" << endl; } - + s << INDENT << "if (signalId < __signalSignatures.length)" << endl << INDENT << " signature = __signalSignatures[signalId].ptr;" << endl << INDENT << "else" << endl diff -r 4920ef9206fe -r c887282e1590 generator/typesystem_gui.xml --- a/generator/typesystem_gui.xml Thu May 13 16:39:41 2010 +0300 +++ b/generator/typesystem_gui.xml Thu May 13 17:11:04 2010 +0300 @@ -2202,7 +2202,7 @@ - + - + +