aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-03-19 12:19:53 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-19 10:50:22 +0100
commit26d5f2e833f0e3686aaa27e695bbfab5fbd808ad (patch)
tree9519d48af819be5c9302f62e7304fda43b93256c
parent341f74356962faae682f6ede218e4e45aa959e13 (diff)
Notify QQJSE::DW of expression deletion during dtor
QQmlJavaScriptExpression::DeleteWatcher's wasDeleted() function simply checks to see if the pointer to the expression being watched is null. This commit ensures that the DeleteWatcher's expression pointer is set to null during QQJSE::dtor(). Change-Id: I566737bf30b4466ba96d771d9846fc3dd860cd2f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 560e0f1342..aad6a04714 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -69,6 +69,8 @@ QQmlJavaScriptExpression::QQmlJavaScriptExpression(VTable *v)
QQmlJavaScriptExpression::~QQmlJavaScriptExpression()
{
clearGuards();
+ if (m_scopeObject.isT2()) // notify DeleteWatcher of our deletion.
+ m_scopeObject.asT2()->_s = 0;
}
void QQmlJavaScriptExpression::setNotifyOnValueChanged(bool v)