Optimization: Minimize refreshing when root context changes
authorAaron Kennedy <aaron.kennedy@nokia.com>
Thu, 3 Nov 2011 16:52:53 +0000 (16:52 +0000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 4 Nov 2011 15:22:04 +0000 (16:22 +0100)
commit3e84e81da776234bf62570b439f1e21848f83c4b
treef4d435300c7ee5f47b98bb1e85b40a34235eca51
parent986367abdac654cea9c1fe37f9ff4226b7516fa5
Optimization: Minimize refreshing when root context changes

Modifying a context requires expressions to be refreshed incase they
depend on a name resolution that changes.  As it is common to modify
the root context, and the root context can't hide any names, it is easy
to constrain the expressions that require refreshing.  In a well
behaving app, this should mean that no expressions are reevaluated when
the root context is modified.

Change-Id: Id3b48cd595fdd6b5a3dc6f26319f652dccaef79c
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/declarative/qml/qdeclarativecontext.cpp
src/declarative/qml/qdeclarativecontext_p.h
src/declarative/qml/v8/qv8contextwrapper.cpp
tests/auto/declarative/qdeclarativecontext/data/refreshExpressionsRootContext.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp