diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 5 | ||||
-rw-r--r-- | src/script/bridge/qscriptqobject_p.h | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 3705e5f..4f19894 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1561,7 +1561,10 @@ QObjectPrototype::QObjectPrototype(JSC::ExecState* exec, WTF::PassRefPtr<JSC::St JSC::Structure* prototypeFunctionStructure) : QScriptObject(structure) { - setDelegate(new QObjectDelegate(new QObject(), QScriptEngine::AutoOwnership, /*options=*/0)); + setDelegate(new QObjectDelegate(new QObjectPrototypeObject(), QScriptEngine::AutoOwnership, + QScriptEngine::ExcludeSuperClassMethods + | QScriptEngine::ExcludeSuperClassProperties + | QScriptEngine::ExcludeChildObjects)); putDirectFunction(exec, new (exec) JSC::PrototypeFunction(exec, prototypeFunctionStructure, /*length=*/0, exec->propertyNames().toString, qobjectProtoFuncToString), JSC::DontEnum); putDirectFunction(exec, new (exec) JSC::PrototypeFunction(exec, prototypeFunctionStructure, /*length=*/1, JSC::Identifier(exec, "findChild"), qobjectProtoFuncFindChild), JSC::DontEnum); diff --git a/src/script/bridge/qscriptqobject_p.h b/src/script/bridge/qscriptqobject_p.h index 9008599..766c3c7 100644 --- a/src/script/bridge/qscriptqobject_p.h +++ b/src/script/bridge/qscriptqobject_p.h @@ -96,6 +96,15 @@ protected: Data *data; }; +class QObjectPrototypeObject : public QObject +{ + Q_OBJECT +public: + QObjectPrototypeObject(QObject *parent = 0) + : QObject(parent) { } + ~QObjectPrototypeObject() { } +}; + class QObjectPrototype : public QScriptObject { public: |