summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlengine.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-26 04:47:03 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-26 04:47:03 (GMT)
commit64ca67183569a1a3b9dc1410dac5bbe8d5f56bb5 (patch)
tree2f6b2af80225ab3903f0cd53b9774783a652f760 /src/declarative/qml/qmlengine.cpp
parent570fa7aece0ce149c22f7b804093f70c7cb1c999 (diff)
parentbace980199f6578ef453c57128fe7f0659bfeddf (diff)
downloadQt-64ca67183569a1a3b9dc1410dac5bbe8d5f56bb5.zip
Qt-64ca67183569a1a3b9dc1410dac5bbe8d5f56bb5.tar.gz
Qt-64ca67183569a1a3b9dc1410dac5bbe8d5f56bb5.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlengine.cpp')
-rw-r--r--src/declarative/qml/qmlengine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index a3fb363..df865f1 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -128,7 +128,7 @@ static QString userLocalDataPath(const QString& app)
QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
: rootContext(0), currentExpression(0),
isDebugging(false), contextClass(0), objectClass(0), valueTypeClass(0), globalClass(0),
- nodeListClass(0), namedNodeMapClass(0), sqlQueryClass(0), scriptEngine(this),
+ nodeListClass(0), namedNodeMapClass(0), sqlQueryClass(0), cleanup(0), scriptEngine(this),
componentAttacheds(0), rootComponent(0), networkAccessManager(0), typeManager(e), uniqueId(1)
{
QScriptValue qtObject =
@@ -168,6 +168,15 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
QmlEnginePrivate::~QmlEnginePrivate()
{
+ while (cleanup) {
+ QmlCleanup *c = cleanup;
+ cleanup = c->next;
+ if (cleanup) cleanup->prev = &cleanup;
+ c->next = 0;
+ c->prev = 0;
+ c->clear();
+ }
+
delete rootContext;
rootContext = 0;
delete contextClass;