From 0c179baade8f4a57c0f9fe7b48367412e8a41f2a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 8 Aug 2013 12:52:56 +0200 Subject: Fix hasOwnProperty on various types wrapped in QML * Change semantics of Object::query to not walk the prototype chain but let the caller do that where needed (__hasProperty__) * Re-implement query in various places * Implement method_hasOwnProperty to fall back to query() if getOwnProperty failed * Fix missing prototype initialization in some qml wrappers, as well as missing base class calls to ::get() Change-Id: Ic2a702fd5ff3be2ff3c8317a8a24f99940a9594f Reviewed-by: Lars Knoll --- src/qml/qml/qqmllistwrapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmllistwrapper.cpp') diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp index e396f700af..7afbe3fd29 100644 --- a/src/qml/qml/qqmllistwrapper.cpp +++ b/src/qml/qml/qqmllistwrapper.cpp @@ -42,6 +42,7 @@ #include "qqmllistwrapper_p.h" #include #include +#include #include @@ -56,6 +57,7 @@ QmlListWrapper::QmlListWrapper(QV8Engine *engine) v8(engine) { vtbl = &static_vtbl; + prototype = QV8Engine::getV4(engine)->objectPrototype; } QmlListWrapper::~QmlListWrapper() @@ -113,7 +115,7 @@ Value QmlListWrapper::get(Managed *m, String *name, bool *hasProperty) if (idx != UINT_MAX) return getIndexed(m, idx, hasProperty); - return Value::undefinedValue(); + return Object::get(m, name, hasProperty); } Value QmlListWrapper::getIndexed(Managed *m, uint index, bool *hasProperty) -- cgit v1.2.3