Skip to content
Commit 59ec1707 authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment