summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* We cant rely on property attributes from JavaScriptCore for the setter and ↵Olivier Goffart2009-07-161-3/+3
| | | | getter
* Convert the strings or number value to jscvalue when they are used with an ↵Olivier Goffart2009-07-161-12/+14
| | | | | | | engine Also change the stringValue not to be a pointer. This fixes a memory leak.
* don't try to be so cleverKent Hansen2009-07-151-7/+4
| | | | | | If we implement the ability to change the global object, the global object pointer can change, so we need to keep a reference to the object if it's stored in a QScriptValue.
* implement ability to dynamically change class of script objectsKent Hansen2009-07-101-25/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* use JSC::call() and JSC::construct()Kent Hansen2009-07-091-54/+2
|
* Fix autotest checking QScriptValue::objectId method.Jedrzej Nowacki2009-07-091-7/+2
| | | | (QScriptValue::objectId() and QScriptEnigne::objectById)
* use currentFrame instead of globalExec whenever we canKent Hansen2009-07-091-27/+27
|
* support callees that are not function objectsKent Hansen2009-07-091-4/+4
| | | | E.g. QScriptClass-based objects.
* rewrite most of QScriptContext handlingKent Hansen2009-07-081-5/+90
| | | | Do it The right way(TM), by lazily wrapping JSC::ExecState objects.
* Fix engineDelete autotest.Jedrzej Nowacki2009-07-081-2/+27
|
* work on QScriptEngine::uncaughtException()Kent Hansen2009-07-071-2/+10
| | | | | | 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.
* fix QScriptValue::construct() when argument is not array-likeKent Hansen2009-07-061-4/+2
|
* make QScriptClass::HasInstance extension workKent Hansen2009-07-061-1/+1
|
* make more tests passKent Hansen2009-07-031-4/+0
|
* implement a fair amount of the QScriptClass functionalityKent Hansen2009-07-021-7/+15
| | | | | Enumeration is missing, as is the ability to change the class of an object after it has been created.
* implement QScriptValue::QObjectMember property flagKent Hansen2009-07-021-0/+2
|
* use the JSC::Getter and JSC::Setter flagsKent Hansen2009-07-021-4/+2
|
* implement QScriptValue::isQMetaObject() and QScriptValue::toQMetaObject()Kent Hansen2009-06-261-10/+8
|
* implement QMetaObject bindingsKent Hansen2009-06-261-2/+2
|
* work on signal bindings (connect, disconnect, signal emission)Kent Hansen2009-06-241-3/+3
|
* make more qscriptengine tests runKent Hansen2009-06-241-4/+10
| | | | | Not everything passes but at least nothing asserts anymore, so the test runs to completion.
* make most of the qscriptvalue tests passKent Hansen2009-06-231-69/+138
| | | | call(), construct() etc.
* use JSC::asObject()Kent Hansen2009-06-231-40/+36
|
* Import JSC-based Qt Script from Kent's tree.Simon Hausmann2009-06-161-0/+2303