aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontext_p.h
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-04-27 16:12:09 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-04 03:41:33 +0200
commitc31026c9ca7ff0c745dba577f9ac2c14d1ef68c5 (patch)
treedd3150dd95af2fa9759852d61d9c87b86322852a /src/qml/qml/qqmlcontext_p.h
parent6318560eca7e3247a63620ce24d2d7e291dd5d84 (diff)
Emit Component.onDestruction before context is invalidated
When a component no longer has any live references, emit the destruction signal immediately so that handlers are run before the associated V8 resources are invalidated. Also, when the root context of the engine is destroyed, emit the destruction signal before destroying any resources needed to process the resulting binding invocations. Change-Id: I722dd6e4b60c499b533fc45e33b61e95bca6187f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontext_p.h')
-rw-r--r--src/qml/qml/qqmlcontext_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcontext_p.h b/src/qml/qml/qqmlcontext_p.h
index 97bc04b91d..1f1c6011a2 100644
--- a/src/qml/qml/qqmlcontext_p.h
+++ b/src/qml/qml/qqmlcontext_p.h
@@ -118,6 +118,7 @@ class Q_QML_EXPORT QQmlContextData
public:
QQmlContextData();
QQmlContextData(QQmlContext *);
+ void emitDestruction();
void clearContext();
void destroy();
void invalidate();
@@ -146,7 +147,8 @@ public:
quint32 isJSContext:1;
quint32 isPragmaLibraryContext:1;
quint32 unresolvedNames:1; // True if expressions in this context failed to resolve a toplevel name
- quint32 dummy:27;
+ quint32 hasEmittedDestruction:1;
+ quint32 dummy:26;
QQmlContext *publicContext;
// VME data that is constructing this context if any