summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlinterval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlinterval.cpp')
-rw-r--r--src/uml/qumlinterval.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/uml/qumlinterval.cpp b/src/uml/qumlinterval.cpp
index 7a171830..de45e7dd 100644
--- a/src/uml/qumlinterval.cpp
+++ b/src/uml/qumlinterval.cpp
@@ -75,6 +75,14 @@ QUmlInterval::QUmlInterval(bool createQModelingObject) :
}
/*!
+ Destroys the QUmlInterval.
+ */
+QUmlInterval::~QUmlInterval()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlInterval.
*/
QModelingElement *QUmlInterval::clone() const
@@ -82,22 +90,10 @@ QModelingElement *QUmlInterval::clone() const
QUmlInterval *c = new QUmlInterval;
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()));
- if (type())
- c->setType(dynamic_cast<QUmlType *>(type()->clone()));
- if (owningTemplateParameter())
- c->setOwningTemplateParameter(dynamic_cast<QUmlTemplateParameter *>(owningTemplateParameter()->clone()));
- if (templateParameter())
- c->setTemplateParameter(dynamic_cast<QUmlTemplateParameter *>(templateParameter()->clone()));
c->setVisibility(visibility());
- if (max())
- c->setMax(dynamic_cast<QUmlValueSpecification *>(max()->clone()));
- if (min())
- c->setMin(dynamic_cast<QUmlValueSpecification *>(min()->clone()));
return c;
}