summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptclass
Commit message (Collapse)AuthorAgeFilesLines
* add QEXPECT_FAIL where it failsOlivier Goffart2009-07-271-0/+1
|
* implement ability to dynamically change class of script objectsKent Hansen2009-07-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | With an object created by QScriptEngine::newObject(), it should be possible to call QScriptValue::setClass() to dynamically change the behavior of that object. Similarly, it should be possible to promote plain script objects to QObject (QVariant) wrappers by calling the overload of QScriptEngine::newQObject() (newVariant()) that takes a script object as the first argument. This commit implements this capability. The premise is the (internal) QScriptObject class, which inherits JSC::JSObject. It reimplements all the methods for getting/setting properties etc. Then there's a level of indirection to facilitate dynamic change of the class: Each QScriptObject can have a delegate associated with it that will handle operations on the object. By default there is no delegate, so the object behaves as a normal JS object, as you expect. However, once a delegate is set (e.g., when QScriptValue::setScriptClass() is called), QScriptObject will give the delegate the chance to handle the object operation. In addition to a delegate implementation for QScriptClass-based objects, there are also delegates for QObject and QVariant wrappers. These replace the QObjectWrapperObject and QVariantWrapperObject classes.
* make QScriptClass::HasInstance extension workKent Hansen2009-07-061-5/+53
|
* start implementing QScriptClass extensionsKent Hansen2009-07-031-0/+1
| | | | Callable seems to work, HasInstance not quite there yet.
* implement a fair amount of the QScriptClass functionalityKent Hansen2009-07-021-0/+3
| | | | | Enumeration is missing, as is the ability to change the class of an object after it has been created.
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Long live Qt 4.5!Lars Knoll2009-03-233-0/+842