aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-05-22 16:51:34 +0200
committerLars Knoll <lars.knoll@digia.com>2013-05-23 15:42:24 +0200
commit31b700b9ddf38283ca06cf78db4a80d674b74661 (patch)
treec947874ad9e5284c35cab7f3af73a5d4dcd8d12f /src/qml/qml/qqmlvmemetaobject.cpp
parentb71fa87e000c5d72d4b2a7146e450dc41dc69055 (diff)
Replace QV8QObjectResource with QV4::QObjectWrapper
Use a proper sub-class instead of external object resources, as a first step towards porting the QObject bindings away from V8. This also replaces the function template / constructor approach and the faster getter optimization with a plain virtual get in the V4::Object. Property lookup in QObject bindings will be subject to future optimizations that will work very differently once we enable the faster V4 lookup mechanism in QML. Change-Id: Ib7c2eead5323c22290c2924de786d9cfcf308c03 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index d40eeff9a5..b22816f0fe 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -1032,9 +1032,9 @@ void QQmlVMEMetaObject::writeVarProperty(int id, v8::Handle<v8::Value> value)
// automatically released by the engine until no other references to it exist.
if (QV4::VariantObject *v = value->v4Value().asVariantObject()) {
v->addVmePropertyReference();
- } else if (QV8QObjectResource *r = v8_resource_cast<QV8QObjectResource>(v8::Handle<v8::Object>::Cast(value))) {
+ } else if (QV4::QObjectWrapper *wrapper = value->v4Value().asQObjectWrapper()) {
// We need to track this QObject to signal its deletion
- valueObject = r->object;
+ valueObject = wrapper->object;
// Do we already have a QObject guard for this property?
if (valueObject && !guard) {