diff options
Diffstat (limited to 'src/uml/qumlobservation.cpp')
-rw-r--r-- | src/uml/qumlobservation.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/uml/qumlobservation.cpp b/src/uml/qumlobservation.cpp index 986d4ea9..b9f1bc71 100644 --- a/src/uml/qumlobservation.cpp +++ b/src/uml/qumlobservation.cpp @@ -70,6 +70,14 @@ QUmlObservation::QUmlObservation() } /*! + Destroys the QUmlObservation. + */ +QUmlObservation::~QUmlObservation() +{ + QModelingElement::deleteQModelingObject(); +} + +/*! Returns a deep-copied clone of the QUmlObservation. */ QModelingElement *QUmlObservation::clone() const @@ -77,12 +85,6 @@ QModelingElement *QUmlObservation::clone() const QUmlObservation *c = new QUmlObservation; 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())); |