aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-08 22:29:47 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-09 15:52:02 +0000
commit009a125d07448428a00abec70a894febe759adec (patch)
treec3c7411073517ce1931e4968f9928085d00782f6 /src/qml/qml
parent5d470f51214b273951cc7612ee018fc347716836 (diff)
Fix ownKey iteration over Proxy objects
Change-Id: I045a4844c06df9232cc8b04485ab0a39bb990e3f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmllistwrapper.cpp3
-rw-r--r--src/qml/qml/qqmllistwrapper_p.h2
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp3
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper_p.h3
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp4
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions_p.h2
6 files changed, 9 insertions, 8 deletions
diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp
index 54ead29131..dcbd3dd488 100644
--- a/src/qml/qml/qqmllistwrapper.cpp
+++ b/src/qml/qml/qqmllistwrapper.cpp
@@ -165,8 +165,9 @@ PropertyKey QmlListWrapperOwnPropertyKeyIterator::next(const Object *o, Property
return ObjectOwnPropertyKeyIterator::next(o, pd, attrs);
}
-OwnPropertyKeyIterator *QmlListWrapper::virtualOwnPropertyKeys(const Object *)
+OwnPropertyKeyIterator *QmlListWrapper::virtualOwnPropertyKeys(const Object *m, Value *target)
{
+ *target = *m;
return new QmlListWrapperOwnPropertyKeyIterator;
}
diff --git a/src/qml/qml/qqmllistwrapper_p.h b/src/qml/qml/qqmllistwrapper_p.h
index 99aad94248..c185122ad9 100644
--- a/src/qml/qml/qqmllistwrapper_p.h
+++ b/src/qml/qml/qqmllistwrapper_p.h
@@ -95,7 +95,7 @@ struct Q_QML_EXPORT QmlListWrapper : Object
static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);
- static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m);
+ static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m, Value *target);
};
struct PropertyListPrototype : Object
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index 2612518cb8..f885182a12 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -289,8 +289,9 @@ PropertyKey QQmlValueTypeWrapperOwnPropertyKeyIterator::next(const Object *o, Pr
}
-OwnPropertyKeyIterator *QQmlValueTypeWrapper::virtualOwnPropertyKeys(const Object *)
+OwnPropertyKeyIterator *QQmlValueTypeWrapper::virtualOwnPropertyKeys(const Object *m, Value *target)
{
+ *target = *m;
return new QQmlValueTypeWrapperOwnPropertyKeyIterator;
}
diff --git a/src/qml/qml/qqmlvaluetypewrapper_p.h b/src/qml/qml/qqmlvaluetypewrapper_p.h
index a1d3b74a45..a79f542d21 100644
--- a/src/qml/qml/qqmlvaluetypewrapper_p.h
+++ b/src/qml/qml/qqmlvaluetypewrapper_p.h
@@ -110,8 +110,7 @@ public:
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);
static bool virtualIsEqualTo(Managed *m, Managed *other);
static PropertyAttributes virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p);
- static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m);
-
+ static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m, Value *target);
static ReturnedValue method_toString(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc);
static void initProto(ExecutionEngine *v4);
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 60cd618e9f..e7899970ad 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -219,13 +219,13 @@ ReturnedValue QtObject::virtualGet(const Managed *m, PropertyKey id, const Value
return ret;
}
-OwnPropertyKeyIterator *QtObject::virtualOwnPropertyKeys(const Object *m)
+OwnPropertyKeyIterator *QtObject::virtualOwnPropertyKeys(const Object *m, Value *target)
{
auto that = static_cast<const QtObject*>(m);
if (!that->d()->isComplete())
const_cast<QtObject *>(that)->addAll();
- return Object::virtualOwnPropertyKeys(m);
+ return Object::virtualOwnPropertyKeys(m, target);
}
/*!
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
index 5dba1544e9..c5e96b3cf3 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
@@ -94,7 +94,7 @@ struct QtObject : Object
V4_OBJECT2(QtObject, Object)
static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);
- static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m);
+ static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m, Value *target);
static ReturnedValue method_isQtObject(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc);
static ReturnedValue method_rgba(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc);