diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-08-26 16:11:38 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-08-30 13:48:19 +0000 |
commit | 12d8004874c3f69ddd5aa7622da309c46930336b (patch) | |
tree | e0bdbb130381ac35469494734c2793ddd153ab8e /tests/auto/qml/qqmlecmascript/data | |
parent | bb26b8ea7b973cf53099a35028780309750b10c7 (diff) |
Fix binding dependencies when used in together with functions
When a function called from a binding would access a scope or context
property, we would end up registering those dependencies as permanent
dependencies in the expression and set m_permanentDependenciesRegistered
to true. Then after the binding evaluation itself, we would not end up
registering the real binding's permanent dependencies.
Change-Id: I3b6c1c181aa064d535362c736b5b2bbc4f576ba9
Done-with: Erik
Task-number: QTBUG-54394
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/dependenciesWithFunctions.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/dependenciesWithFunctions.qml b/tests/auto/qml/qqmlecmascript/data/dependenciesWithFunctions.qml new file mode 100644 index 0000000000..57d3ae2f14 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/dependenciesWithFunctions.qml @@ -0,0 +1,12 @@ +import QtQml 2.0 +QtObject { + property int value: 100 + property bool success: { + unrelatedFunction(); + return value == 42; + } + property int unrelatedValue: 100 + function unrelatedFunction() { + return unrelatedValue; + } +} |