diff options
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 90e6850161..aea7827832 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -372,9 +372,18 @@ void ExecutionContext::setProperty(const StringRef name, const ValueRef value) activation = static_cast<GlobalContext *>(ctx)->global; } - if (activation && (ctx->type == Type_QmlContext || activation->__hasProperty__(name))) { - activation->put(name, value); - return; + if (activation) { + if (ctx->type == Type_QmlContext) { + activation->put(name, value); + return; + } else { + PropertyAttributes attrs; + Property *p = activation->__getOwnProperty__(name, &attrs); + if (p) { + activation->putValue(p, attrs, value); + return; + } + } } } } |