Description
Currently QScriptValue::setProperty() can be used for too many things.
- Creating a property with certain flags (e.g. ReadOnly).
- Changing the value + flags of a property (e.g. making an existing property Undeletable).
- Setting the getter or setter of a property (PropertyGetter|PropertySetter flags).
- Not relevant to this task: Deleting a property.
Removing the flags argument would help a lot.
Properties should be created with default (no) attributes, just like in JS.
If the user needs to control the attributes, and/or define a getter/setter property, additional API should be used for that, inspired by the defineProperty() API in ECMAScript 5.