Changes resulting from code safety review:
umbrello/cmds/generic/cmdcreateumlobject.cpp - In function redo() case m_package, the case (m_package->baseType() == UMLObject::ot_Association) is too grave for a mere error message. Replace by Q_ASSERT. This is an exceptional case for which we need a crash report with steps for reproducing and backtrace (code analysis has not revealed how this could happen). umbrello/toolbarstateassociation.cpp - In function mouseReleaseAssociation() call to currentAssociation()->createAssocClassLine() replace static_cast of m_firstWidget by dynamic_cast. If the dynamic_cast yields null then log an error message and do not call currentAssociation()->createAssocClassLine() and m_firstWidget->addAssoc(). umbrello/umlwidgets/associationwidget.cpp - In function setUMLObject, - add TODO note about changing return type to `bool`; - before calling WidgetBase::setUMLObject() save umlObject() to local umlSave; - if execution of switch(ot) goes to the default branch then restore original m_umlObject using WidgetBase::setUMLObject(umlSave). - As a peripheral change, at function computeAssocClassLine() remove TODO note about endpoints not being movable (since commit 33610081 they are movable).
parent
12c34ce7
Please register or sign in to comment