summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
Commit message (Collapse)AuthorAgeFilesLines
* Avoid calling out to public API in the QtScript implementationKent Hansen2010-02-184-72/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to construct QScriptValues when JSC::JSValues can be operated on directly. A benchmark showed that ~10% of the time for reading a QObject property from a script was spent just creating and destroying QScriptValue temporaries. It's time to finally get rid of this potential bottleneck, not just in the QObject integration but everywhere. This change refactors the code so that all internal operations are performed on JSC::JSValue (most importantly, conversion from/to Qt types), and the public API functions are just thin wrappers around these. E.g. instead of doing enginePrivate->scriptValueFromJSCValue(jsValue).toQObject() the implementation now does QScriptEnginePrivate::toQObject(jsValue) Other operations are delegated to the engine implementation in similar style. Task-number: QTBUG-8304 Reviewed-by: Jedrzej Nowacki
* Compile.Warwick Allison2010-02-031-0/+1
|
* Merge branch '4.6' of ../qt into kinetic-declarativeuiAaron Kennedy2010-01-201-1/+8
|\ | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp
| * Remove QtScript connection when receiver QObject has been deletedKent Hansen2010-01-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | We don't want to have to listen to the destroyed() signal for every receiver object of a connection, and likewise we don't want to create a QObject to handle each connection; instead, remove the connection lazily at signal emission time after we've detected that the receiver has been deleted. Task-number: QTBUG-7313 Reviewed-by: Simon Hausmann
* | Merge branch '4.6' of ../qt into kinetic-declarativeuiAaron Kennedy2010-01-191-1/+2
|\ \ | |/
| * don't assert when calling QtScript-wrapped method of deleted QObjectKent Hansen2010-01-181-1/+2
| | | | | | | | | | | | Make it behave the same as the old (4.5) back-end. Reviewed-by: Jedrzej Nowacki
* | Fix possible crashAaron Kennedy2010-01-152-4/+9
| | | | | | | | The QScriptValue does not always have a valid QScriptEngine.
* | Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic ↵Aaron Kennedy2010-01-1418-19/+182
|\ \ | | | | | | | | | into kinetic-declarativeui
| * \ Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into ↵Warwick Allison2010-01-1418-19/+182
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | kinetic-declarativeui Conflicts: bin/syncqt src/corelib/io/qurl.cpp
| | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-1118-18/+18
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (71 commits) QNAM HTTP Code: Cache socket state inside ensureConnection() tst_qhttpnetworkconnection: Test also HEAD in some tests tst_qhttpnetworkconnection: Relax condition in getMultipleWithPriorities QNAM HTTP Code: When starting new request, prefer connected sockets. typo fix Added the 'framecapture' WebKit example to the default build. Fix code example fix typo in qreadwritelock's documentation QNAM HTTP: Don't call d_func() so often QNAM HTTP: Fix readBuffer maximum size. QNAM HTTP: Optimize eatWhitespace() QNAM HTTP: Check if socket already tries to connect. network internals: fix build on S60 [syncqt] Make -separate-module work with WebKit's directory structure doc: Corrected explanation of when append() does nothing. doc: Added clarification about allocating space for the 0 terminator. Add a way to access the normalised URL in QUrl. [syncqt] Make it possible to synchronize headers for a separate module [syncqt] Make it possible to override the base directory network internals: start HTTP GET requests right away when called ...
| | | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-0718-18/+18
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| | | | * Update copyright year to 2010Jason McDonald2010-01-0618-18/+18
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| | * | | Correctly determine QScriptValue::isQObject() for QObjects using theMichael Brasser2010-01-112-0/+6
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | QScriptDeclarativeClass. Task-number: QTBUG-6178 Reviewed-by: Kent Hansen Reviewed-by: Aaron Kennedy
| | * | Implement QScript::QObjectDelegate::getOwnPropertyDescriptorOlivier Goffart2010-01-054-1/+164
| | |/ | | | | | | | | | | | | | | | | | | This is needed for the fix for QTBUG-5749 that follow Reviewed-by: Kent Hansen Task-number: QTBUG-5749
* | | Support calling in QScriptDeclarativeClassAaron Kennedy2010-01-144-3/+58
|/ /
* | CompileAaron Kennedy2010-01-121-1/+1
| |
* | Optimization: Add QScriptDeclarativeClass::ValueAaron Kennedy2010-01-113-5/+199
| | | | | | | | | | | | | | This class is essentially the same as QScriptValue, but it is faster as it doesn't reference objects. Thus, they might be collected if the gc runs. For return values from QScriptDeclarativeClass this isn't a problem, of course.
* | Correctly determine QScriptValue::isQObject() for QObjects using theMichael Brasser2009-12-172-0/+6
| | | | | | | | | | | | | | | | | | | | | | QScriptDeclarativeClass. This allows us to pass QObjects to QML-defined functions which expect a QVariant (and will presumably help in other cases where we expect transparent QObject <-> QVariant conversion in the engine). Task-number: QTBUG-6178 Reviewed-by: Aaron Kennedy
* | Introduce experimental binding optimizerAaron Kennedy2009-12-141-0/+1
|/ | | | Enable with QML_EXPERIMENTAL=1
* Fix garbage collection issue with script-owned objects with connectionsKent Hansen2009-11-301-13/+14
| | | | | | | | | | This reinstates the pre-4.6 behavior: A script-owned C++ object that's not referenced anymore should be garbage collected, even if it has connections. In order to achieve this, the "weak" reference to the C++ object's wrapper must be invalidated. Task-number: QTBUG-6366 Reviewed-by: Simon Hausmann
* Fixed the QtScript license information in the source files to referSimon Hausmann2009-11-1718-342/+18
| | | | | | | | to the LGPL only. To do this I ran replace-licenses.zsh $QTDIR/src/script release Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Replace LGPL license tags with LGPL-ONLYSimon Hausmann2009-11-1718-18/+18
| | | | Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Compile in namespaceAaron Kennedy2009-11-171-0/+1
| | | | Reviewed-by: alex
* Add QScriptDeclarativeClassAaron Kennedy2009-11-106-3/+810
| | | | | | | | | QScriptDeclarativeClass is a private, but exported, class used by the declarativeui module. It is very similar to QScriptClass, but slightly faster and provides a couple of "backdoor" extension mechanisms used by declarative. Reviewed-by: Warwick Allison
* Fix QT_NO_PROPERTIESJørgen Lind2009-10-291-0/+16
| | | | | | | However, there are some stuff added to qscript that I'm really not sure about. Reviewed-by: tom
* Inline internal QtScript object data() functionsKent Hansen2009-10-232-16/+16
| | | | | | Makes QScriptValue::data() 15% faster. Reviewed-by: Olivier Goffart
* Inline internal QtScript object delegate functionsKent Hansen2009-10-234-31/+31
| | | | | | Makes QScriptValue::scriptClass() 20% faster. Reviewed-by: Olivier Goffart
* compile fix with namespaced qthjk2009-09-283-5/+5
| | | | Reviewed-by: Simon Hausmann
* Update src/3rdparty/javascriptcore and adapt src/script to the changes.Kent Hansen2009-09-2412-135/+131
| | | | Reviewed-by: Simon Hausmann
* don't crash in property access after script class has been set to 0Kent Hansen2009-09-221-0/+1
| | | | | | | | When the script class is set to 0, we need to remove the script object's delegate entirely, because the delegate requires a non-0 script class in order to be useful. Reviewed-by: Olivier Goffart
* make sure the engine's currentFrame is in sync when calling out to public APIKent Hansen2009-09-221-1/+7
| | | | | | | The currentFrame pointer is used e.g. by QScriptValue::toString(). It needs to be in sync, otherwise we will crash. Reviewed-by: Olivier Goffart
* QtScript: Fix comparing QVariant and QObject.Olivier Goffart2009-09-216-0/+42
| | | | | | | This add a hook inside JSC to be able to implement our own comparison function when comparing objects. Reviewed-by: Kent Hansen
* use JSObject::inherits() instead of JSObject::isObject()Kent Hansen2009-09-212-5/+5
| | | | | | The functions are identical, but in recent WebKit trunk isObject() doesn't exist anymore. So this renaming is done to prepare for the import of a more recent JavaScriptCore.
* Update license headers again.Jason McDonald2009-09-0914-56/+56
| | | | Reviewed-by: Trust Me
* Prospective SunCC compile fixSimon Hausmann2009-09-041-1/+1
| | | | | | Call the QScriptValue constructor without class scope. Reviewed-by: Trust me
* improve memory management scheme of QScriptString(Private)Kent Hansen2009-09-021-4/+12
| | | | | | | | Get rid of QPointer. Use linked list of privates (like was recently done for QScriptValue). Allocate the private on the stack when we can. Reviewed-by: Olivier Goffart
* fix warnings on mingwThierry Bastian2009-09-021-0/+1
|
* Optimize QScriptClassOlivier Goffart2009-09-021-8/+4
| | | | | | | Do not convert JSC::Identifier to QString to convert it later to JSC::Identivier again Reviewed-by: Kent Hansen
* doc: Fixed several qdoc errors.Martin Smith2009-08-311-2/+2
|
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-3112-156/+156
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-312-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
* make sure hasInstance() is always invoked for custom script objectsKent Hansen2009-08-311-1/+1
| | | | | | | Need to specify the OverridesHasInstance flag, otherwise the JIT will do the standard hasInstance implementation instead of calling our virtual function. This makes the QScriptClass::extension() autotest pass.
* fix whacky behavior of QScriptValue::toString() for QVariantKent Hansen2009-08-271-1/+1
| | | | | | | | For some types, an empty string is the correct and complete conversion of the type. If the result is an empty string, use QVariant::canConvert() to determine if that is indeed correct, before falling back to the "string-conversion-not-available" path.
* implement proxying of JSObject::putWithAttributes() on Global ObjectKent Hansen2009-08-262-0/+13
| | | | | | Otherwise the property is stored on the wrong object (the proxy). This fix makes the Qt bindings generated by qtscriptgenerator work again.
* Fix memory leak in QScriptEngine::newQObjectOlivier Goffart2009-08-251-0/+2
| | | | | | | Do not reset the delegate and the prototype when reusing existing wrapper. Reviewed-by: Kent Hansen
* compile fix with namespaced Qthjk2009-08-245-10/+16
|
* use QVarLengthArray instead of QVector for holding JS argumentsKent Hansen2009-08-241-2/+1
| | | | | | It's faster. Reviewed-by: Olivier Goffart
* Fix obsolete license headers.Jason McDonald2009-08-2110-10/+10
| | | | Reviewed-by: Trust Me
* add recursion guard for GC markingKent Hansen2009-08-203-4/+10
| | | | | | | To achieve behavior of the old back-end. There, the recursion guard was automatic because a mark flag was set on the object as soon as marking begun, but in JSC it appears to only be set _after_ the marking is completed.
* Fix "fixme" in QtFunction::mark()Jedrzej Nowacki2009-08-201-3/+1
| | | | | | QtFunction::mark() does not cause infinite recursion any more. Reviewed-by: Kent Hansen