summaryrefslogtreecommitdiffstats
path: root/src/script/bridge/qscriptqobject.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-02 10:21:40 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-02 10:21:40 (GMT)
commitdb684926cf69e329ca845c6204bbbbd5506721e6 (patch)
treeba7fe1b29f242222da52d8193c89ba63b0256b5d /src/script/bridge/qscriptqobject.cpp
parent481211251438441aee79b8bc6178e7157eba7f61 (diff)
downloadQt-db684926cf69e329ca845c6204bbbbd5506721e6.zip
Qt-db684926cf69e329ca845c6204bbbbd5506721e6.tar.gz
Qt-db684926cf69e329ca845c6204bbbbd5506721e6.tar.bz2
implement QScriptValue::QObjectMember property flag
Diffstat (limited to 'src/script/bridge/qscriptqobject.cpp')
-rw-r--r--src/script/bridge/qscriptqobject.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index ae7a75b..3cd0091 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -146,7 +146,8 @@ static inline QByteArray methodName(const QMetaMethod &method)
static unsigned flagsForMetaProperty(const QMetaProperty &prop)
{
return (JSC::DontDelete
- | (!prop.isWritable() ? unsigned(JSC::ReadOnly) : unsigned(0)));
+ | (!prop.isWritable() ? unsigned(JSC::ReadOnly) : unsigned(0))
+ | QObjectMemberAttribute);
}
static int indexOfMetaEnum(const QMetaObject *meta, const QByteArray &str)
@@ -1151,7 +1152,7 @@ bool QObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec,
if (hasMethodAccess(method, index, opt)) {
if (!(opt & QScriptEngine::ExcludeSuperClassMethods)
|| (index >= meta->methodOffset())) {
- attributes = 0;
+ attributes = QObjectMemberAttribute;
if (opt & QScriptEngine::SkipMethodsInEnumeration)
attributes |= JSC::DontEnum;
return true;
@@ -1174,7 +1175,7 @@ bool QObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec,
index = qobject->dynamicPropertyNames().indexOf(name);
if (index != -1) {
- attributes = 0;
+ attributes = QObjectMemberAttribute;
return true;
}
@@ -1184,7 +1185,7 @@ bool QObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec,
QMetaMethod method = meta->method(index);
if (hasMethodAccess(method, index, opt)
&& (methodName(method) == name)) {
- attributes = 0;
+ attributes = QObjectMemberAttribute;
if (opt & QScriptEngine::SkipMethodsInEnumeration)
attributes |= JSC::DontEnum;
return true;