[Uml-devel] Correction for patch
Achim.Spangler at mnet-online.de
Wed Mar 17 05:02:00 UTC 2004
I was too early with my assumption to have fixed the problem.
I detected too late, that the UseCase and Actor listitem entries are now
inserted at wanted folder. But I missed due to my big project, that there is
a double item outside the wanted folder.
Now I detected the reason:
Each Actor and UseCase entry is registered with UMLListViewItem instance
_before_ the corresponding UMLListView::loadChildrenFromXMI() is called.
After some debug messages, I detected that the central UMLListView instance
gets the following slot connection in
with the line:
This slot connection triggers the call of UMLListView::slotObjectChanged()
which derives from the initiating object a pointer to a UMLListViewItem
instance. For the returned pointer, the function
UMLListViewItem::updateObject() is called.
I detected after the insertion of some debug messages in
UMLListViewItem::updateObject(), that UMLListViewItem::updateObject() is
called for each Actor and UseCase of my project _before_ the item would by
created by UMLListView::loadChildrenFromXMI().
Check in UMLListView::loadChildrenFromXMI() if there exists already a
UMLListViewItem instance with same UID. If such an item is found, delete it,
as the _main_ function to create the instance during load is
I attach the corresponding diff against the currenct CVS with final working
I hope the maintainers of the corresponding parts can follow my descriptions,
so that they can accept or correct my suggestions.
By the way:
Maybe the approach to delete UMLListViewItem instances for items which are
loaded at the moment could be also suitable for the other UML types.
Am Dienstag 16 März 2004 16:32 schrieb Achim Spangler:
> as I can create Use-Case and Actor entries as part of a folder, I'd like to
> load them into that folder again.
> But this is not possible at the moment.
> UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, QDomElement &
> element )
> handles these UML types equivalent to class, enum, ... which can be only
> nested in packages.
> Possible solution:
> Change UMLListView::loadChildrenFromXMI( UMLListViewItem * parent,
> QDomElement & element )
> + Deactivate special handling - simply comment out corresponding
> case-labels + Use default switch-case handling
> Change UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, QString
> name, Uml::ListView_Type t,int id)
> + Set pixmap correct for diagrams, use case and actors
> I performed these steps, and attached the diff ( diff -u -d -r1 ) relative
> to umbrello subdirectory of kdesdk.
> Please integrate or make a better solution.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 699 bytes
Desc: not available
More information about the umbrello-devel