aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qv8engine.cpp
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2011-09-30 11:14:10 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-06 05:29:00 +0200
commit752cd2aca42f6625f1cfc364937e0d39828cf954 (patch)
treedcb8891d7ff0d99d7bcbf948ed6339c4cce6b257 /src/declarative/qml/v8/qv8engine.cpp
parent6bd1704c42f564980677682e1d47e91129d94e5c (diff)
Add JavaScript "var" property type to QML
This commit adds a new syntax which allows "var" type properties which can have JavaScript objects (as well as other basic types) assigned to them. Such JavaScript objects cannot be bound to. Task-number: QMLNG-18 Change-Id: If7f5045f4669e0d5c1b8d0891ed765128d0bc1c6 Reviewed-on: http://codereview.qt-project.org/1466 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8/qv8engine.cpp')
-rw-r--r--src/declarative/qml/v8/qv8engine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/declarative/qml/v8/qv8engine.cpp
index 5259ab19b4..7012ae14c5 100644
--- a/src/declarative/qml/v8/qv8engine.cpp
+++ b/src/declarative/qml/v8/qv8engine.cpp
@@ -41,6 +41,7 @@
#include "qv8engine_p.h"
+#include "qv8gccallback_p.h"
#include "qv8contextwrapper_p.h"
#include "qv8valuetypewrapper_p.h"
#include "qv8gccallback_p.h"
@@ -135,6 +136,8 @@ QV8Engine::QV8Engine(QJSEngine* qq, QJSEngine::ContextOwnership ownership)
m_variantWrapper.init(this);
m_valueTypeWrapper.init(this);
+ QV8GCCallback::registerGcPrologueCallback();
+
{
v8::Handle<v8::Value> v = global()->Get(v8::String::New("Object"))->ToObject()->Get(v8::String::New("getOwnPropertyNames"));
m_getOwnPropertyNames = qPersistentNew<v8::Function>(v8::Handle<v8::Function>::Cast(v));