Why does UMLObject derive from QObject, anyway?
Robert Hairgrove <[email protected]>
| Newsgroups | gmane.linux.umbrello.devel |
|---|---|
| Message-ID | <[email protected]> |
The two signals declared in UMLObject are only connected to other SIGNALS in the classes derived from UMLObject; there are no SLOTS which use these signals, AFAICT. (I just opened the Umbrello project in Qt Creator and made extensive use of the "Find References to Symbol under cursor" feature...) And it seems that the automatic deletion facility offered by the parent-child relationships of QObject types is mostly not used, or not used correctly. Is there any documentation that explains the reasoning for this QObject relationship? If the other derived classes were not QObjects, maybe it would be easier to implement proper copy and assignment which are disallowed by QObject (and more predictable memory management). Of course, this applies mostly to the non-widget classes; we need the widgets for the diagrams and the rest of the GUI, of course. But the UML document objects could just as well be non-Qt classes, perhaps implementing the underlying data stores for different model types which the diagrams and views (list and tree views) could use.