summaryrefslogtreecommitdiffstats
path: root/src/mof/qmofcomment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mof/qmofcomment.cpp')
-rw-r--r--src/mof/qmofcomment.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mof/qmofcomment.cpp b/src/mof/qmofcomment.cpp
index 513c8cfc..43298a0f 100644
--- a/src/mof/qmofcomment.cpp
+++ b/src/mof/qmofcomment.cpp
@@ -64,6 +64,14 @@ QMofComment::QMofComment(bool createQModelingObject)
}
/*!
+ Destroys the QMofComment.
+ */
+QMofComment::~QMofComment()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QMofComment.
*/
QModelingElement *QMofComment::clone() const
@@ -71,8 +79,6 @@ QModelingElement *QMofComment::clone() const
QMofComment *c = new QMofComment;
foreach (QMofComment *element, ownedComments())
c->addOwnedComment(dynamic_cast<QMofComment *>(element->clone()));
- foreach (QMofElement *element, annotatedElements())
- c->addAnnotatedElement(dynamic_cast<QMofElement *>(element->clone()));
c->setBody(body());
return c;
}