Refine fix for dynamic properties on QObjects wrapped in JavaScript
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 10 Apr 2014 10:58:15 +0000 (12:58 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 17 Apr 2014 05:09:54 +0000 (07:09 +0200)
commit37e4975e5f43a85e81109b115bfe10d371d0bf89
treebe5d98fa38a782ae91f2798c1a89a381e23e26d9
parent6572d4e50d73ac60a8974d07de74c27a7f99ebef
Refine fix for dynamic properties on QObjects wrapped in JavaScript

This is an ammendment to commit 60730cbb5e5475b5db6a15641211aa6958a93197
to further restrict the ability to set dynamic properties on JS wrapped
QObjects only on those that are associated with a qml context. Only one
such association comes with the static property lookup rules of QML and
therefore only those should be prohibited from dynamic properties.

The previous implementation on using the "compiledData" field to detect QML
association or not is not strong and reliable enough.

Change-Id: I10c0e6e58a2727c01a6cb56fdf912bf250333e1f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
src/qml/jsruntime/qv4qobjectwrapper.cpp
tests/auto/qml/qjsengine/tst_qjsengine.cpp