From 3e1bb90da4c44455c8c307e01876cc2127bdb15c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 17 Jun 2018 22:06:45 +0200 Subject: Implement a virtual interface for getOwnProperty This is required to support Proxy properly, and at the same time fixes a couple of test failures. The new interface also replaces the old query and queryIndexed virtual interfaces, as those where doing a subset of what getOwnProperty does. Change-Id: I750e366b475ce971d6d9edf35fa17b7a2b07f771 Reviewed-by: Simon Hausmann --- src/qml/jsapi/qjsvalue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsapi/qjsvalue.cpp') diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index 348ddb25d9..63b10adf2b 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -1291,7 +1291,7 @@ bool QJSValue::hasOwnProperty(const QString &name) const return false; ScopedString s(scope, engine->newIdentifier(name)); - return o->hasOwnProperty(s); + return o->getOwnProperty(s->identifier()) != Attr_Invalid; } /*! -- cgit v1.2.3