summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlcomment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlcomment.cpp')
-rw-r--r--src/uml/qumlcomment.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/uml/qumlcomment.cpp b/src/uml/qumlcomment.cpp
index b7ac6f33..94f5f980 100644
--- a/src/uml/qumlcomment.cpp
+++ b/src/uml/qumlcomment.cpp
@@ -62,6 +62,14 @@ QUmlComment::QUmlComment(bool createQModelingObject)
}
/*!
+ Destroys the QUmlComment.
+ */
+QUmlComment::~QUmlComment()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlComment.
*/
QModelingElement *QUmlComment::clone() const
@@ -69,8 +77,6 @@ QModelingElement *QUmlComment::clone() const
QUmlComment *c = new QUmlComment;
foreach (QUmlComment *element, ownedComments())
c->addOwnedComment(dynamic_cast<QUmlComment *>(element->clone()));
- foreach (QUmlElement *element, annotatedElements())
- c->addAnnotatedElement(dynamic_cast<QUmlElement *>(element->clone()));
c->setBody(body());
return c;
}