Priority: P2: Important
Affects Version/s: None
Fix Version/s: None
Component/s: Qt Script
The QObject bindings in src/declarative/qml/qdeclarativeobjectscriptclass.cpp are doing a lot of the same stuff as the QObject bindings in QtScript. But QtScript does extra stuff that QML doesn't need (dynamic properties, child objects).
QtScript's bindings should support the behavior that QML needs.
Effectively, this means being able to replace calls like
With V8, we can implement a binding for the "static" parts of the QObject (meta-object properties, methods) using accessors only. It's important to try to avoid interceptors, since then we have to manage the caching on our side (and v8::String is not as good for associate mapping as JSC::Identifier).
The only dynamic part of the qdeclarativeobjectscriptclass binding is the "evalContext" part. But it seems this is only used as a fallback in case the normal QObject property lookup fails.
What would be good to have is a way to have interceptors as fallback on the same object; right now, the behavior in V8 is that the interceptor will always take precedence over per-property accessors.