summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine_p.h
Commit message (Collapse)AuthorAgeFilesLines
* implement ability to dynamically change class of script objectsKent Hansen2009-07-101-60/+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.
* Fix autotest checking QScriptValue::objectId method.Jedrzej Nowacki2009-07-091-7/+4
| | | | (QScriptValue::objectId() and QScriptEnigne::objectById)
* rewrite most of QScriptContext handlingKent Hansen2009-07-081-1/+6
| | | | Do it The right way(TM), by lazily wrapping JSC::ExecState objects.
* Fix engineDelete autotest.Jedrzej Nowacki2009-07-081-0/+15
|
* work on QScriptEngine::uncaughtException()Kent Hansen2009-07-071-0/+1
| | | | | | It's possible that JSC evaluate() returns a completion of type Throw without hadException() being true, so we need to store the exception value explicitly.
* implement QScriptEngine::availableExtensions()Kent Hansen2009-07-061-0/+4
|
* start implementing QScriptClass extensionsKent Hansen2009-07-031-1/+7
| | | | Callable seems to work, HasInstance not quite there yet.
* implement a fair amount of the QScriptClass functionalityKent Hansen2009-07-021-1/+57
| | | | | Enumeration is missing, as is the ability to change the class of an object after it has been created.
* first stab at implementing Qt property getter/settersKent Hansen2009-07-021-0/+1
| | | | Not fully working yet, so disabled for now
* implement setting of default prototype in newQObject()Kent Hansen2009-06-301-0/+3
|
* implement QMetaObject bindingsKent Hansen2009-06-261-0/+5
|
* work on signal bindings (connect, disconnect, signal emission)Kent Hansen2009-06-241-0/+16
|
* make more qscriptengine tests runKent Hansen2009-06-241-1/+4
| | | | | Not everything passes but at least nothing asserts anymore, so the test runs to completion.
* Import JSC-based Qt Script from Kent's tree.Simon Hausmann2009-06-161-0/+157