diff options
Diffstat (limited to 'src/uml/qumlabstraction.cpp')
-rw-r--r-- | src/uml/qumlabstraction.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/uml/qumlabstraction.cpp b/src/uml/qumlabstraction.cpp index 18c5297f..c9e6fc83 100644 --- a/src/uml/qumlabstraction.cpp +++ b/src/uml/qumlabstraction.cpp @@ -74,6 +74,14 @@ QUmlAbstraction::QUmlAbstraction(bool createQModelingObject) : } /*! + Destroys the QUmlAbstraction. + */ +QUmlAbstraction::~QUmlAbstraction() +{ + QModelingElement::deleteQModelingObject(); +} + +/*! Returns a deep-copied clone of the QUmlAbstraction. */ QModelingElement *QUmlAbstraction::clone() const @@ -81,20 +89,10 @@ QModelingElement *QUmlAbstraction::clone() const QUmlAbstraction *c = new QUmlAbstraction; foreach (QUmlComment *element, ownedComments()) c->addOwnedComment(dynamic_cast<QUmlComment *>(element->clone())); - if (owningTemplateParameter()) - c->setOwningTemplateParameter(dynamic_cast<QUmlTemplateParameter *>(owningTemplateParameter()->clone())); - if (templateParameter()) - c->setTemplateParameter(dynamic_cast<QUmlTemplateParameter *>(templateParameter()->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()); - foreach (QUmlNamedElement *element, clients()) - c->addClient(dynamic_cast<QUmlNamedElement *>(element->clone())); - foreach (QUmlNamedElement *element, suppliers()) - c->addSupplier(dynamic_cast<QUmlNamedElement *>(element->clone())); if (mapping()) c->setMapping(dynamic_cast<QUmlOpaqueExpression *>(mapping()->clone())); return c; |