aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllistwrapper.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-08 12:52:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-08 15:35:18 +0200
commit0c179baade8f4a57c0f9fe7b48367412e8a41f2a (patch)
tree30c775eda2fcba23827bdfc7f5d4c042813b8a2e /src/qml/qml/qqmllistwrapper.cpp
parent5046e8898803ab3e83f4dae1260345fdba207a32 (diff)
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmllistwrapper.cpp')
-rw-r--r--src/qml/qml/qqmllistwrapper.cpp4
1 files changed, 3 insertions, 1 deletions
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 <private/qv8engine_p.h>
#include <private/qqmllist_p.h>
+#include <private/qv4objectproto_p.h>
#include <private/qv4functionobject_p.h>
@@ -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)