diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-16 09:27:57 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-16 09:27:57 (GMT) |
commit | f76a2fa667e19f2a42b2b22ea893a9d29dd74028 (patch) | |
tree | 24db61691f75abb0f80fe1fb433c579a8c9e2cce /src/script/bridge/qscriptqobject.cpp | |
parent | fa7b011149589cd5dbcd4bd080a72bfaa3297d66 (diff) | |
download | Qt-f76a2fa667e19f2a42b2b22ea893a9d29dd74028.zip Qt-f76a2fa667e19f2a42b2b22ea893a9d29dd74028.tar.gz Qt-f76a2fa667e19f2a42b2b22ea893a9d29dd74028.tar.bz2 |
fix enumeration of QObject wrapper objects
Don't add method names, only signatures.
Respect the SkipMethodsInEnumeration option.
Diffstat (limited to 'src/script/bridge/qscriptqobject.cpp')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 85e255c..23d61e3 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1485,15 +1485,13 @@ void QObjectDelegate::getPropertyNames(QScriptObject *object, JSC::ExecState *ex } } - { + if (!(opt & QScriptEngine::SkipMethodsInEnumeration)) { int i = (opt & QScriptEngine::ExcludeSuperClassMethods) ? meta->methodOffset() : 0; for ( ; i < meta->methodCount(); ++i) { QMetaMethod method = meta->method(i); if (hasMethodAccess(method, i, opt)) { QMetaMethod method = meta->method(i); - QString name = QString::fromLatin1(methodName(method)); - propertyNames.add(JSC::Identifier(exec, qtStringToJSCUString(name))); QString sig = QString::fromLatin1(method.signature()); propertyNames.add(JSC::Identifier(exec, qtStringToJSCUString(sig))); } |