[umbrello] [Bug 371990] Crash when removing pin widgets after owning component has been removed before

Ralf Habacker bugzilla_noreply at kde.org
Wed Nov 2 21:07:30 UTC 2016


Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
                 CC|                            |ralf.habacker at freenet.de

--- Comment #2 from Ralf Habacker <ralf.habacker at freenet.de> ---
Comment on attachment 101978
  --> https://bugs.kde.org/attachment.cgi?id=101978
Patch to fix crash: Remove PinPortBase objects when owner is removed.

I can confirm that the patch fixes the crash. Looking at the patch I have a few
1. The owner management of the PinWidgets is done by the private member m_pOw.
UMLWidgets is derived from QGraphicsItem which also has a owner/parent
management with parentItem(). In principal it looks possible to use that
instead of m_pOw. Any idea how much the related effort would be to fix the
issue that way ? 
2. The usage of Q_ASSERT(m_baseType >= wt_UMLWidget && m_baseType <= wt_Port);
is good, but also introduces in further development to miss some added enum
values.  It would be better to introduce enum constants for the upper and lower
limit and to check against them.
3. Redoing has issues: I removed one pin, then the component and tried to redo
both with results into incomplete redo.
4. For detailed review there is reviewboard.kde.org

You are receiving this mail because:
You are the assignee for the bug.

More information about the umbrello-devel mailing list