[Uml-devel] Problem with the umllistviewdata merge.

Brian Thomas brian.thomas at gsfc.nasa.gov
Tue Sep 23 09:18:41 UTC 2003


	Oliver, all,

	Ok I did some digging around in the code, with the specific goal
	of finding out why dragging a class from the umllistview to the class
	diagram kept spawning tons of zombie copies of my class in the view
	and ultimately, crashing umbrello.

	As it turns out, decodeClip3 is called for every acceptDrag event
	of the umllistview, as well as by a contentsDragEnterEvent for the 
	umlview. The problem arises in decodeClip3 because it is trying to
	create a copy of the object being dragged. In the old days, this was
	just a data package associated with the listviewitem, but now its the
	listviewitem itself. The issue is that umllistview item directly inherits
	from qlistviewitem for which the constructor being called will cause the 
	'parent' umllistviewitem to not be copieds but really be the parent object, 
	appending the new umllistviewitem inside of itself. Thus zombie 
	umllistviewitems are created. Its really ugly and I see no easy way out
	of the problem other than using a passed data object that doesnt inherit
	from qlistviewitem.

	Oliver, unless you see an easy fix to this, I would advocate that you back
	out of these changes from CVS and work on them further before 
	resubmitting.  There are other issues with this merge patch, but this one 
	issue is enough to halt all of my other progress on the code generation 
	work.

				-b.t.





More information about the umbrello-devel mailing list