summaryrefslogtreecommitdiffstats
path: root/src/uml/qumlstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uml/qumlstate.cpp')
-rw-r--r--src/uml/qumlstate.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/uml/qumlstate.cpp b/src/uml/qumlstate.cpp
index 3c1fa870..4edda4e6 100644
--- a/src/uml/qumlstate.cpp
+++ b/src/uml/qumlstate.cpp
@@ -87,6 +87,14 @@ QUmlState::QUmlState(bool createQModelingObject) :
}
/*!
+ Destroys the QUmlState.
+ */
+QUmlState::~QUmlState()
+{
+ QModelingElement::deleteQModelingObject();
+}
+
+/*!
Returns a deep-copied clone of the QUmlState.
*/
QModelingElement *QUmlState::clone() const
@@ -94,8 +102,6 @@ QModelingElement *QUmlState::clone() const
QUmlState *c = new QUmlState;
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()));
@@ -107,8 +113,6 @@ QModelingElement *QUmlState::clone() const
foreach (QUmlPackageImport *element, packageImports())
c->addPackageImport(dynamic_cast<QUmlPackageImport *>(element->clone()));
c->setLeaf(isLeaf());
- if (container())
- c->setContainer(dynamic_cast<QUmlRegion *>(container()->clone()));
foreach (QUmlConnectionPointReference *element, connections())
c->addConnection(dynamic_cast<QUmlConnectionPointReference *>(element->clone()));
foreach (QUmlPseudostate *element, connectionPoints())
@@ -121,14 +125,10 @@ QModelingElement *QUmlState::clone() const
c->setEntry(dynamic_cast<QUmlBehavior *>(entry()->clone()));
if (exit())
c->setExit(dynamic_cast<QUmlBehavior *>(exit()->clone()));
- if (redefinedState())
- c->setRedefinedState(dynamic_cast<QUmlState *>(redefinedState()->clone()));
foreach (QUmlRegion *element, regions())
c->addRegion(dynamic_cast<QUmlRegion *>(element->clone()));
if (stateInvariant())
c->setStateInvariant(dynamic_cast<QUmlConstraint *>(stateInvariant()->clone()));
- if (submachine())
- c->setSubmachine(dynamic_cast<QUmlStateMachine *>(submachine()->clone()));
return c;
}