Hallo! A question about object ownership.
WAbstractItemModel inherits from WObject. It is supplied a WObject as parent in a constructor, so that means WAbstractItemModel instance should be destroyed when parent is destroyed, i.e. ownership for this object belongs to parent. Now if I supply the model to WComboBox the first thing that WComboBox::setModel unconditionally does is to delete it's current model. Manual says "The model may not be 0, and ownership of the model is not transferred.", so I expected the model to continue to be valid even when it is replaced by another one in combo box (and got several obscure coredumps). So is it a bug or a feature? :-) BTW, TableView does not delete current model when setting the new one. Best regards, -- \ / | Michael Ivanov (OvO) | (^^^) | \^/ | ^ ^ | ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
