summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativestate.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-10 08:53:30 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-10 08:53:30 +1000
commit41bb458f095bf796d3a083eaa1c9d547f3fed745 (patch)
treea11c948e1bda056271a839fdc3eb923a0e6cb32e /src/declarative/util/qdeclarativestate.cpp
parentf0c4a037f9ebd184dc25571fa591f89dba943105 (diff)
parentb03eac0d7d31c878fef7799367c148196de8a13f (diff)
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team: Migrate addMarkUp function to QChar. update the proxy info before session is opened in QNAM by Aapo Makela Dragging in nested views no longer works as expected QSslCertificate: block all DigiNotar (intermediate and root) certs QSslCertificate: also check common name for blacklisted certificates Fix implicit height not growing when pre-edit text wraps. Fix typo in header guard. fix doc typo Ensure that the corewlan plugin can be built with the Mac OS X 10.7 sdk remove obsolete define Fix leak in State element. Fix leak in bindings created by PropertyChanges.
Diffstat (limited to 'src/declarative/util/qdeclarativestate.cpp')
-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();
+ }
+ }
}
/*!