aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-12-31 13:21:39 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-08 22:08:55 +0100
commita6c36616b0ccf9c1aeb71d90437c9226ae76fe10 (patch)
tree5c8e796b9fe6f15c08bd20dc20d084976c75845b /src/qml/qml/qqmlcomponent.cpp
parentfbf674e566032121d6d0a865dbff2a5dac2b3f0d (diff)
Move extension mechanism over to use the v4 engine
Change-Id: Ib329fc7bcae3c78d962a116f53b2244a71f81228 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 115046f543..96623f21c3 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -87,12 +87,12 @@ QT_BEGIN_NAMESPACE
class QQmlComponentExtension : public QV8Engine::Deletable
{
public:
- QQmlComponentExtension(QV8Engine *);
+ QQmlComponentExtension(QV4::ExecutionEngine *v4);
virtual ~QQmlComponentExtension();
QV4::PersistentValue incubationProto;
};
-V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension);
+V4_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension);
/*!
\class QQmlComponent
@@ -1361,7 +1361,7 @@ void QQmlComponent::incubateObject(QQmlV4Function *args)
mode = QQmlIncubator::AsynchronousIfNested;
}
- QQmlComponentExtension *e = componentExtension(args->v4engine()->v8Engine);
+ QQmlComponentExtension *e = componentExtension(args->v4engine());
QV4::Scoped<QV4::QmlIncubatorObject> r(scope, v4->memoryManager->alloc<QV4::QmlIncubatorObject>(args->v4engine()->v8Engine, mode));
QV4::ScopedObject p(scope, e->incubationProto.value());
@@ -1406,9 +1406,8 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Valu
}
}
-QQmlComponentExtension::QQmlComponentExtension(QV8Engine *engine)
+QQmlComponentExtension::QQmlComponentExtension(QV4::ExecutionEngine *v4)
{
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine);
QV4::Scope scope(v4);
QV4::ScopedObject proto(scope, v4->newObject());
proto->defineAccessorProperty(QStringLiteral("onStatusChanged"),