summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlliteralstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlliteralstring.cpp')
-rw-r--r--src/uml/qumlliteralstring.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/uml/qumlliteralstring.cpp b/src/uml/qumlliteralstring.cpp
index 6f4b8665..a5c1d18e 100644
--- a/src/uml/qumlliteralstring.cpp
+++ b/src/uml/qumlliteralstring.cpp
@@ -73,6 +73,14 @@ QUmlLiteralString::QUmlLiteralString(bool createQModelingObject)
}
/*!
+ Destroys the QUmlLiteralString.
+ */
+QUmlLiteralString::~QUmlLiteralString()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlLiteralString.
*/
QModelingElement *QUmlLiteralString::clone() const
@@ -80,17 +88,9 @@ QModelingElement *QUmlLiteralString::clone() const
QUmlLiteralString *c = new QUmlLiteralString;
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());
c->setValue(value());
return c;