Commit 712297cb authored by Jochen Becher's avatar Jochen Becher

ModelEditor: Fix coverity findings

Change-Id: I40d58ce3e5040dc083bbcd27cc6481510ae41f95
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 34de70c2
......@@ -150,7 +150,7 @@ void DFlatAssignmentVisitor::visitDConnection(const DConnection *connection)
{
visitDRelation(connection);
auto target = dynamic_cast<DConnection *>(m_target);
QMT_CHECK(target);
QMT_ASSERT(target, return);
target->setCustomRelationId(connection->customRelationId());
target->setEndA(connection->endA());
target->setEndB(connection->endB());
......@@ -160,6 +160,7 @@ void DFlatAssignmentVisitor::visitDAnnotation(const DAnnotation *annotation)
{
visitDElement(annotation);
auto target = dynamic_cast<DAnnotation *>(m_target);
QMT_ASSERT(target, return);
target->setText(annotation->text());
target->setPos(annotation->pos());
target->setRect(annotation->rect());
......@@ -171,6 +172,7 @@ void DFlatAssignmentVisitor::visitDBoundary(const DBoundary *boundary)
{
visitDElement(boundary);
auto target = dynamic_cast<DBoundary *>(m_target);
QMT_ASSERT(target, return);
target->setText(boundary->text());
target->setPos(boundary->pos());
target->setRect(boundary->rect());
......
Markdown is supported
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