diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-16 12:19:59 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-16 15:13:36 (GMT) |
commit | dbff4e318aaba904f0c7dbf7720954d3514c904a (patch) | |
tree | dc14a7b23cf56332c77a5cee3b080c186784733a /src/script/api | |
parent | 11ba9df469af573dbfdf0754569b623b5ea44542 (diff) | |
download | Qt-dbff4e318aaba904f0c7dbf7720954d3514c904a.zip Qt-dbff4e318aaba904f0c7dbf7720954d3514c904a.tar.gz Qt-dbff4e318aaba904f0c7dbf7720954d3514c904a.tar.bz2 |
We cant rely on property attributes from JavaScriptCore for the setter and getter
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 4d5361e..9fe9041 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1821,13 +1821,13 @@ QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QString &name, result |= QScriptValue::SkipInEnumeration; if (attribs & JSC::DontDelete) result |= QScriptValue::Undeletable; - if (attribs & JSC::Getter) + //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?) + if (attribs & JSC::Getter || !JSC::asObject(d->jscValue)->lookupGetter(exec, id).isUndefinedOrNull()) result |= QScriptValue::PropertyGetter; - if (attribs & JSC::Setter) + if (attribs & JSC::Setter || !JSC::asObject(d->jscValue)->lookupSetter(exec, id).isUndefinedOrNull()) result |= QScriptValue::PropertySetter; if (attribs & QScript::QObjectMemberAttribute) result |= QScriptValue::QObjectMember; - result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange); return result; } |