summaryrefslogtreecommitdiffstats
path: root/src/script/bridge/qscriptdeclarativeclass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/bridge/qscriptdeclarativeclass.cpp')
-rw-r--r--src/script/bridge/qscriptdeclarativeclass.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp
index 0df9a49..ce2fc23 100644
--- a/src/script/bridge/qscriptdeclarativeclass.cpp
+++ b/src/script/bridge/qscriptdeclarativeclass.cpp
@@ -90,6 +90,11 @@ QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, const QString &value
new (this) JSC::JSValue(JSC::jsString(QScriptEnginePrivate::frameForContext(ctxt), value));
}
+QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, const QScriptValue &value)
+{
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(ctxt->engine())->scriptValueToJSCValue(value));
+}
+
QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, int value)
{
new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
@@ -120,12 +125,11 @@ QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, const QString &value)
new (this) JSC::JSValue(JSC::jsString(QScriptEnginePrivate::get(eng)->currentFrame, value));
}
-QScriptDeclarativeClass::Value::Value(const QScriptValue &value)
+QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, const QScriptValue &value)
{
- new (this) JSC::JSValue(QScriptValuePrivate::get(&value)->engine->scriptValueToJSCValue(value));
+ new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->scriptValueToJSCValue(value));
}
-
QScriptDeclarativeClass::Value::~Value()
{
((JSC::JSValue *)(this))->~JSValue();