summaryrefslogtreecommitdiffstats
path: root/src/script/bridge/qscriptqobject.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-15 09:45:00 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-15 09:45:00 (GMT)
commit25e41f5bbf3ad288a6b2f9eec0fbef7c5b171744 (patch)
tree161087ed0d0502c4fddc6805ca8329487bfeab2b /src/script/bridge/qscriptqobject.cpp
parent630444819350b9f7a31c34798405c4e6fd53dc62 (diff)
downloadQt-25e41f5bbf3ad288a6b2f9eec0fbef7c5b171744.zip
Qt-25e41f5bbf3ad288a6b2f9eec0fbef7c5b171744.tar.gz
Qt-25e41f5bbf3ad288a6b2f9eec0fbef7c5b171744.tar.bz2
implement QObject prototype object
Diffstat (limited to 'src/script/bridge/qscriptqobject.cpp')
-rw-r--r--src/script/bridge/qscriptqobject.cpp5
1 files changed, 4 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);