summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/bridge/qscriptdeclarativeclass.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp
index acfb2a4..0f450ca 100644
--- a/src/script/bridge/qscriptdeclarativeclass.cpp
+++ b/src/script/bridge/qscriptdeclarativeclass.cpp
@@ -70,9 +70,12 @@ QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, uint value)
new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
}
-QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, bool value)
+QScriptDeclarativeClass::Value::Value(QScriptContext *, bool value)
{
- new (this) JSC::JSValue(QScriptEnginePrivate::frameForContext(ctxt), value);
+ if (value)
+ new (this) JSC::JSValue(JSC::JSValue::JSTrue);
+ else
+ new (this) JSC::JSValue(JSC::JSValue::JSFalse);
}
QScriptDeclarativeClass::Value::Value(QScriptContext *ctxt, double value)
@@ -107,7 +110,10 @@ QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, uint value)
QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, bool value)
{
- new (this) JSC::JSValue(QScriptEnginePrivate::get(eng)->currentFrame, value);
+ if (value)
+ new (this) JSC::JSValue(JSC::JSValue::JSTrue);
+ else
+ new (this) JSC::JSValue(JSC::JSValue::JSFalse);
}
QScriptDeclarativeClass::Value::Value(QScriptEngine *eng, double value)