diff options
Diffstat (limited to 'src/uml/qumlcontrolflow.cpp')
-rw-r--r-- | src/uml/qumlcontrolflow.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/uml/qumlcontrolflow.cpp b/src/uml/qumlcontrolflow.cpp index e8eb2eeb..202155bc 100644 --- a/src/uml/qumlcontrolflow.cpp +++ b/src/uml/qumlcontrolflow.cpp @@ -79,6 +79,14 @@ QUmlControlFlow::QUmlControlFlow(bool createQModelingObject) } /*! + Destroys the QUmlControlFlow. + */ +QUmlControlFlow::~QUmlControlFlow() +{ + QModelingElement::deleteQModelingObject(); +} + +/*! Returns a deep-copied clone of the QUmlControlFlow. */ QModelingElement *QUmlControlFlow::clone() const @@ -86,29 +94,13 @@ QModelingElement *QUmlControlFlow::clone() const QUmlControlFlow *c = new QUmlControlFlow; foreach (QUmlComment *element, ownedComments()) c->addOwnedComment(dynamic_cast<QUmlComment *>(element->clone())); - foreach (QUmlDependency *element, clientDependencies()) - c->addClientDependency(dynamic_cast<QUmlDependency *>(element->clone())); c->setName(name()); if (nameExpression()) c->setNameExpression(dynamic_cast<QUmlStringExpression *>(nameExpression()->clone())); c->setVisibility(visibility()); c->setLeaf(isLeaf()); - if (activity()) - c->setActivity(dynamic_cast<QUmlActivity *>(activity()->clone())); if (guard()) c->setGuard(dynamic_cast<QUmlValueSpecification *>(guard()->clone())); - foreach (QUmlActivityPartition *element, inPartitions()) - c->addInPartition(dynamic_cast<QUmlActivityPartition *>(element->clone())); - if (inStructuredNode()) - c->setInStructuredNode(dynamic_cast<QUmlStructuredActivityNode *>(inStructuredNode()->clone())); - if (interrupts()) - c->setInterrupts(dynamic_cast<QUmlInterruptibleActivityRegion *>(interrupts()->clone())); - foreach (QUmlActivityEdge *element, redefinedEdges()) - c->addRedefinedEdge(dynamic_cast<QUmlActivityEdge *>(element->clone())); - if (source()) - c->setSource(dynamic_cast<QUmlActivityNode *>(source()->clone())); - if (target()) - c->setTarget(dynamic_cast<QUmlActivityNode *>(target()->clone())); if (weight()) c->setWeight(dynamic_cast<QUmlValueSpecification *>(weight()->clone())); return c; |