summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlstategroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmlstategroup.cpp')
-rw-r--r--src/declarative/util/qmlstategroup.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp
index 506ab82..d6ce191 100644
--- a/src/declarative/util/qmlstategroup.cpp
+++ b/src/declarative/util/qmlstategroup.cpp
@@ -119,6 +119,9 @@ QmlStateGroup::QmlStateGroup(QObject *parent)
QmlStateGroup::~QmlStateGroup()
{
+ Q_D(const QmlStateGroup);
+ for (int i = 0; i < d->states.count(); ++i)
+ d->states.at(i)->setStateGroup(0);
}
QList<QmlState *> QmlStateGroup::states() const
@@ -380,4 +383,10 @@ QmlState *QmlStateGroup::findState(const QString &name) const
return 0;
}
+void QmlStateGroup::removeState(QmlState *state)
+{
+ Q_D(QmlStateGroup);
+ d->states.removeOne(state);
+}
+
QT_END_NAMESPACE