Skip to content

Commit

Permalink
Notify QQJSE::DW of expression deletion during dtor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Adams authored and Qt by Nokia committed Mar 19, 2012
1 parent 341f743 commit 26d5f2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qml/qml/qqmljavascriptexpression.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 26d5f2e

Please sign in to comment.