aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontextwrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-30 23:29:28 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-17 09:03:43 +0000
commita4aa358acf763469bf46244c7f5a3a358c038a81 (patch)
tree24b800bf1577cfa665609edad5f4e008f972c6f4 /src/qml/qml/qqmlcontextwrapper.cpp
parentd6a1943b2410933046204102080536c4aade4442 (diff)
Fix Object::getOwnProperty API
Don't return a Proprety pointer, this has issues with StringObject. Instead pass in a pointer that will get filled with the correct data. Change-Id: I28536ca129f5be3a4a1bc9583223521458411195 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 9b921b9fad..6fbfc844c8 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -278,10 +278,9 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
return;
QV4::Scoped<QmlContextWrapper> wrapper(scope, resource);
- PropertyAttributes attrs;
- Property *pd = wrapper->__getOwnProperty__(name, &attrs);
- if (pd) {
- wrapper->putValue(pd, attrs, value);
+ uint member = wrapper->internalClass()->find(name);
+ if (member < UINT_MAX) {
+ wrapper->putValue(wrapper->propertyAt(member), wrapper->internalClass()->propertyData[member], value);
return;
}