summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-08 02:13:46 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-08 02:13:46 +1000
commit4aed0ed39de64990df28e72082cd79f799297369 (patch)
tree57c5b1e7c771a0fd5976a0ba0a51e131b4646707 /src/declarative/util
parent4cb429ce1e1ce5f1cecaceafbe74e6ebde2b6372 (diff)
parentef5eabdd58a9f584cff8b4e70b7eea583957114c (diff)
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qdeclarativestate.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 9f56ccb02e..ee3d06b4db 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -173,6 +173,18 @@ QDeclarativeState::~QDeclarativeState()
Q_D(QDeclarativeState);
if (d->group)
d->group->removeState(this);
+
+ /*
+ destroying an active state does not return us to the
+ base state, so we need to clean up our revert list to
+ prevent leaks. In the future we may want to redconsider
+ this overall architecture.
+ */
+ for (int i = 0; i < d->revertList.count(); ++i) {
+ if (d->revertList.at(i).binding()) {
+ d->revertList.at(i).binding()->destroy();
+ }
+ }
}
/*!