deleting children of KoShapeContainer

Boudewijn Rempt boud at valdyas.org
Wed Apr 20 13:27:53 BST 2011


On Wednesday 20 April 2011 Apr, C. Boemann wrote:
> Hi
> 
> I believe it's important for the KoShapeContainer to delete it's children.

Well, we should have a clear idea on how to handle memory management for shapes. Until now, it's been clear that the container/group isn't responsible for deleting shapes, and we never had a real parent-child relationship for shapes, like QGraphicsView has for QGraphicsItems.

So I think that the application should remember which shapes it has created and delete them. Since shape containers are shapes as well, those can be deleted as well.

I don't think there should be transitive deletion of shapes like you get with you delete a QObject or a QGraphicsItem.

> I have a crash related to not all shapes being deleted.

I think that crash should be fixed in Stage, not in Flake.

> 
> However I also think that for some grouping ungrouping kind of things it is 
> changing behaviour
> 


-- 
Boudewijn Rempt | http://www.valdyas.org, http://www.krita.org



More information about the calligra-devel mailing list