summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-06-25 08:24:40 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-06-25 08:24:40 (GMT)
commit7d52e7a2c9cdcdb16ae3d91b7be147a926489fbc (patch)
tree70a704a05799460827deecb07e28bca41fc6a6ca /src/script/api/qscriptengine.cpp
parent06ea7cfc8f682904496889aedec03b1f00b0a8e7 (diff)
parenta91f8d704c3ff3826f0ea8b7e73fc6d91dd5b836 (diff)
downloadQt-7d52e7a2c9cdcdb16ae3d91b7be147a926489fbc.zip
Qt-7d52e7a2c9cdcdb16ae3d91b7be147a926489fbc.tar.gz
Qt-7d52e7a2c9cdcdb16ae3d91b7be147a926489fbc.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index e2999c1..655026c 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -64,6 +64,7 @@
#include "bridge/qscriptqobject_p.h"
#include "bridge/qscriptglobalobject_p.h"
#include "bridge/qscriptactivationobject_p.h"
+#include "bridge/qscriptstaticscopeobject_p.h"
#ifndef QT_NO_QOBJECT
#include <QtCore/qcoreapplication.h>
@@ -905,6 +906,7 @@ QScriptEnginePrivate::QScriptEnginePrivate()
JSC::ExecState* exec = globalObject->globalExec();
scriptObjectStructure = QScriptObject::createStructure(globalObject->objectPrototype());
+ staticScopeObjectStructure = QScriptStaticScopeObject::createStructure(JSC::jsNull());
qobjectPrototype = new (exec) QScript::QObjectPrototype(exec, QScript::QObjectPrototype::createStructure(globalObject->objectPrototype()), globalObject->prototypeFunctionStructure());
qobjectWrapperObjectStructure = QScriptObject::createStructure(qobjectPrototype);
@@ -1770,15 +1772,7 @@ void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue object
} else if (flags != QScriptValue::KeepExistingFlags) {
if (thisObject->hasOwnProperty(exec, id))
thisObject->deleteProperty(exec, id); // ### hmmm - can't we just update the attributes?
- unsigned attribs = 0;
- if (flags & QScriptValue::ReadOnly)
- attribs |= JSC::ReadOnly;
- if (flags & QScriptValue::SkipInEnumeration)
- attribs |= JSC::DontEnum;
- if (flags & QScriptValue::Undeletable)
- attribs |= JSC::DontDelete;
- attribs |= flags & QScriptValue::UserRange;
- thisObject->putWithAttributes(exec, id, value, attribs);
+ thisObject->putWithAttributes(exec, id, value, propertyFlagsToJSCAttributes(flags));
} else {
JSC::PutPropertySlot slot;
thisObject->put(exec, id, value, slot);