If class A has an abstract method, it is marked as an abstract class.  This is 
good.  If class B inherits from class A, but doesn't have any abstract 
methods of it's own, it is still marked as abstract, that is not good.  A 
class should only be marked abstract if it directly has an abstract method, 
or is marked abstract with /Abstract/.

Patch attached.

Matt
--- sip-snapshot-20060930/sipgen/transform.c	2006-10-04 19:30:44.000000000 -0700
+++ sipgen/transform.c	2006-10-13 11:37:12.000000000 -0700
@@ -1186,7 +1186,13 @@
 				for (od = mrocd -> overs; od != NULL; od = od -> next)
 					if (od -> common == md)
 					{
-						if (isAbstract(od))
+						/*
+						 * Mark classes as abstract if they have abstract virtual methods.
+						 * but only if the method is directly in the class, not inherited,
+						 * because the abstract method may already be implemented in a 
+						 * derived class.
+						 */
+						if (isAbstract(od) && mrocd == cd)
 							setIsAbstractClass(cd);
 
 						ifaceFilesAreUsed(pt, cd->iff, od);
_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to