diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-04 14:47:08 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-04 14:48:15 (GMT) |
commit | 28e8cb97ed2813a6baac36f1795b3ba9c71892c2 (patch) | |
tree | 2110883da644ecb4e8694414dd38319dc42c2393 /src/script/bridge | |
parent | 394f62d779e6e120ce2fc19bd61ec64bd29a87a9 (diff) | |
download | Qt-28e8cb97ed2813a6baac36f1795b3ba9c71892c2.zip Qt-28e8cb97ed2813a6baac36f1795b3ba9c71892c2.tar.gz Qt-28e8cb97ed2813a6baac36f1795b3ba9c71892c2.tar.bz2 |
adapt to commit 014c4c63066fd3920594e6a58b02f314b5c88cdf
Diffstat (limited to 'src/script/bridge')
-rw-r--r-- | src/script/bridge/qscriptclassobject.cpp | 5 | ||||
-rw-r--r-- | src/script/bridge/qscriptclassobject_p.h | 3 | ||||
-rw-r--r-- | src/script/bridge/qscriptobject.cpp | 12 | ||||
-rw-r--r-- | src/script/bridge/qscriptobject_p.h | 6 | ||||
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 10 | ||||
-rw-r--r-- | src/script/bridge/qscriptqobject_p.h | 6 |
6 files changed, 26 insertions, 16 deletions
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp index 4913e73..5232ca2 100644 --- a/src/script/bridge/qscriptclassobject.cpp +++ b/src/script/bridge/qscriptclassobject.cpp @@ -125,7 +125,8 @@ void ClassObjectDelegate::put(QScriptObject* object, JSC::ExecState *exec, } bool ClassObjectDelegate::deleteProperty(QScriptObject* object, JSC::ExecState *exec, - const JSC::Identifier &propertyName) + const JSC::Identifier &propertyName, + bool checkDontDelete) { // ### avoid duplication of put() QScriptEnginePrivate *engine = scriptEngineFromExec(exec); @@ -141,7 +142,7 @@ bool ClassObjectDelegate::deleteProperty(QScriptObject* object, JSC::ExecState * m_scriptClass->setProperty(scriptObject, scriptName, id, QScriptValue()); return true; } - return QScriptObjectDelegate::deleteProperty(object, exec, propertyName); + return QScriptObjectDelegate::deleteProperty(object, exec, propertyName, checkDontDelete); } bool ClassObjectDelegate::getPropertyAttributes(const QScriptObject* object, JSC::ExecState *exec, diff --git a/src/script/bridge/qscriptclassobject_p.h b/src/script/bridge/qscriptclassobject_p.h index 61ece04..39d281d 100644 --- a/src/script/bridge/qscriptclassobject_p.h +++ b/src/script/bridge/qscriptclassobject_p.h @@ -84,7 +84,8 @@ public: const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(QScriptObject*, JSC::ExecState*, - const JSC::Identifier& propertyName); + const JSC::Identifier& propertyName, + bool checkDontDelete = true); virtual bool getPropertyAttributes(const QScriptObject*, JSC::ExecState*, const JSC::Identifier&, unsigned&) const; diff --git a/src/script/bridge/qscriptobject.cpp b/src/script/bridge/qscriptobject.cpp index 65c4754..e4d2168 100644 --- a/src/script/bridge/qscriptobject.cpp +++ b/src/script/bridge/qscriptobject.cpp @@ -117,11 +117,12 @@ void QScriptObject::put(JSC::ExecState* exec, const JSC::Identifier& propertyNam } bool QScriptObject::deleteProperty(JSC::ExecState* exec, - const JSC::Identifier& propertyName) + const JSC::Identifier& propertyName, + bool checkDontDelete) { if (!d || !d->delegate) - return JSC::JSObject::deleteProperty(exec, propertyName); - return d->delegate->deleteProperty(this, exec, propertyName); + return JSC::JSObject::deleteProperty(exec, propertyName, checkDontDelete); + return d->delegate->deleteProperty(this, exec, propertyName, checkDontDelete); } bool QScriptObject::getPropertyAttributes(JSC::ExecState* exec, const JSC::Identifier& propertyName, @@ -203,9 +204,10 @@ void QScriptObjectDelegate::put(QScriptObject* object, JSC::ExecState* exec, } bool QScriptObjectDelegate::deleteProperty(QScriptObject* object, JSC::ExecState* exec, - const JSC::Identifier& propertyName) + const JSC::Identifier& propertyName, + bool checkDontDelete) { - return object->JSC::JSObject::deleteProperty(exec, propertyName); + return object->JSC::JSObject::deleteProperty(exec, propertyName, checkDontDelete); } bool QScriptObjectDelegate::getPropertyAttributes(const QScriptObject* object, diff --git a/src/script/bridge/qscriptobject_p.h b/src/script/bridge/qscriptobject_p.h index 17e5e6b..b52e654 100644 --- a/src/script/bridge/qscriptobject_p.h +++ b/src/script/bridge/qscriptobject_p.h @@ -85,7 +85,8 @@ public: virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(JSC::ExecState*, - const JSC::Identifier& propertyName); + const JSC::Identifier& propertyName, + bool checkDontDelete = true); virtual bool getPropertyAttributes(JSC::ExecState*, const JSC::Identifier&, unsigned&) const; virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, bool includeNonEnumerable = false); @@ -139,7 +140,8 @@ public: virtual void put(QScriptObject*, JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(QScriptObject*, JSC::ExecState*, - const JSC::Identifier& propertyName); + const JSC::Identifier& propertyName, + bool checkDontDelete = true); virtual bool getPropertyAttributes(const QScriptObject*, JSC::ExecState*, const JSC::Identifier&, unsigned&) const; virtual void getPropertyNames(QScriptObject*, JSC::ExecState*, JSC::PropertyNameArray&, diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 4e9b74b..324b149 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1368,7 +1368,8 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec, } bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec, - const JSC::Identifier& propertyName) + const JSC::Identifier& propertyName, + bool checkDontDelete) { QByteArray name = qtStringFromJSCUString(propertyName.ustring()).toLatin1(); QObject *qobject = data->value; @@ -1407,7 +1408,7 @@ bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec return true; } - return QScriptObjectDelegate::deleteProperty(object, exec, propertyName); + return QScriptObjectDelegate::deleteProperty(object, exec, propertyName, checkDontDelete); } bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object, @@ -1723,7 +1724,8 @@ void QMetaObjectWrapperObject::put(JSC::ExecState* exec, const JSC::Identifier& } bool QMetaObjectWrapperObject::deleteProperty( - JSC::ExecState *exec, const JSC::Identifier& propertyName) + JSC::ExecState *exec, const JSC::Identifier& propertyName, + bool checkDontDelete) { if (propertyName == exec->propertyNames().prototype) return false; @@ -1738,7 +1740,7 @@ bool QMetaObjectWrapperObject::deleteProperty( } } } - return JSC::JSObject::deleteProperty(exec, propertyName); + return JSC::JSObject::deleteProperty(exec, propertyName, checkDontDelete); } bool QMetaObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec, diff --git a/src/script/bridge/qscriptqobject_p.h b/src/script/bridge/qscriptqobject_p.h index 14b426e..0af6632 100644 --- a/src/script/bridge/qscriptqobject_p.h +++ b/src/script/bridge/qscriptqobject_p.h @@ -102,7 +102,8 @@ public: const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(QScriptObject*, JSC::ExecState*, - const JSC::Identifier& propertyName); + const JSC::Identifier& propertyName, + bool checkDontDelete = true); virtual bool getPropertyAttributes(const QScriptObject*, JSC::ExecState*, const JSC::Identifier&, unsigned&) const; @@ -291,7 +292,8 @@ public: virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(JSC::ExecState*, - const JSC::Identifier& propertyName); + const JSC::Identifier& propertyName, + bool checkDontDelete = true); virtual bool getPropertyAttributes(JSC::ExecState*, const JSC::Identifier&, unsigned&) const; virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, |