diff options
Diffstat (limited to 'src/uml/qumlcreateobjectaction.cpp')
-rw-r--r-- | src/uml/qumlcreateobjectaction.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/uml/qumlcreateobjectaction.cpp b/src/uml/qumlcreateobjectaction.cpp index 3ca1525a..b18e8ed8 100644 --- a/src/uml/qumlcreateobjectaction.cpp +++ b/src/uml/qumlcreateobjectaction.cpp @@ -85,6 +85,14 @@ QUmlCreateObjectAction::QUmlCreateObjectAction(bool createQModelingObject) : } /*! + Destroys the QUmlCreateObjectAction. + */ +QUmlCreateObjectAction::~QUmlCreateObjectAction() +{ + QModelingElement::deleteQModelingObject(); +} + +/*! Returns a deep-copied clone of the QUmlCreateObjectAction. */ QModelingElement *QUmlCreateObjectAction::clone() const @@ -92,27 +100,11 @@ QModelingElement *QUmlCreateObjectAction::clone() const QUmlCreateObjectAction *c = new QUmlCreateObjectAction; 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())); - foreach (QUmlInterruptibleActivityRegion *element, inInterruptibleRegions()) - c->addInInterruptibleRegion(dynamic_cast<QUmlInterruptibleActivityRegion *>(element->clone())); - foreach (QUmlActivityPartition *element, inPartitions()) - c->addInPartition(dynamic_cast<QUmlActivityPartition *>(element->clone())); - if (inStructuredNode()) - c->setInStructuredNode(dynamic_cast<QUmlStructuredActivityNode *>(inStructuredNode()->clone())); - foreach (QUmlActivityEdge *element, incomings()) - c->addIncoming(dynamic_cast<QUmlActivityEdge *>(element->clone())); - foreach (QUmlActivityEdge *element, outgoings()) - c->addOutgoing(dynamic_cast<QUmlActivityEdge *>(element->clone())); - foreach (QUmlActivityNode *element, redefinedNodes()) - c->addRedefinedNode(dynamic_cast<QUmlActivityNode *>(element->clone())); foreach (QUmlExceptionHandler *element, handlers()) c->addHandler(dynamic_cast<QUmlExceptionHandler *>(element->clone())); c->setLocallyReentrant(isLocallyReentrant()); @@ -120,8 +112,6 @@ QModelingElement *QUmlCreateObjectAction::clone() const c->addLocalPostcondition(dynamic_cast<QUmlConstraint *>(element->clone())); foreach (QUmlConstraint *element, localPreconditions()) c->addLocalPrecondition(dynamic_cast<QUmlConstraint *>(element->clone())); - if (classifier()) - c->setClassifier(dynamic_cast<QUmlClassifier *>(classifier()->clone())); if (result()) c->setResult(dynamic_cast<QUmlOutputPin *>(result()->clone())); return c; |