Don't generate useless InheritTypes interfaces

Interfaces with no descendant need neither a Base trait nor upcast functions,
and interfaces with no ancestors neither a Derived trait nor downcast functions.
This commit is contained in:
Anthony Ramine 2015-09-25 02:06:55 +02:00
parent a7208869f2
commit e24b8ab644
2 changed files with 78 additions and 51 deletions

View file

@ -227,9 +227,9 @@ class Descriptor(DescriptorProvider):
if self.proxy:
iface = self.interface
while iface:
iface.setUserData('hasProxyDescendant', True)
while iface.parent:
iface = iface.parent
iface.setUserData('hasProxyDescendant', True)
self.name = interface.identifier.name