[PyKDE] fix for abstract classes with %ConvertToSubClassCode

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Sun Mar 5 16:20:03 GMT 2006


Phil,

I have abstract classes with %ConvertToSubClassCode which SIP-20060304 does not
handle.  The following patch seems to work:


$ gendiff sip-snapshot-20060304 .sub
--- sip-snapshot-20060304/sipgen/gencode.c.sub  2006-03-05 17:02:38.000000000 +0100
+++ sip-snapshot-20060304/sipgen/gencode.c      2006-03-05 17:07:41.000000000 +0100
@@ -6963,7 +6963,10 @@
 "      0,\n"
 "      ", mname, classFQCName(cd));

-       if (isAbstractClass(cd))
+       // I have abstract classes with %ConvertToSubClassCode
+       if (isAbstractClass(cd) && cd->subbase != NULL)
+              prcode(fp, "SIP_TYPE_ABSTRACT | SIP_TYPE_SCC,\n");
+       else if (isAbstractClass(cd))
               prcode(fp, "SIP_TYPE_ABSTRACT,\n");
        else if (cd->subbase != NULL)
               prcode(fp, "SIP_TYPE_SCC,\n");


Gerard




More information about the PyQt mailing list