summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* remove symbian vestigesOswald Buddenhagen2012-12-0419-84/+7
| | | | | Change-Id: Id4cf97c6ca3b9d4335daf4f32842fb07f51c557e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Doc: Changed link in qdocconf file to point to landing page.Jerome Pasion2012-12-031-2/+3
| | | | | | | -affects the QCH file. Change-Id: I05d38a4bdeca359ff6f58c434e6d61198487d2a5 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix up the Qt Script docsLars Knoll2012-11-293-92/+48
| | | | | Change-Id: I20e6d2fca4faef1586b5da3ff494fb8196645f34 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Change copyright holder from Nokia to DigiaSergio Ahumada2012-11-271-1/+1
| | | | | Change-Id: I3a9c2dbe0262d5139314b7447adce8bbb599f9b8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Updated the module overviewLars Knoll2012-11-271-26/+36
| | | | | | | | | | | Mention the JS functionality in Qt Qml, and that Qt Qml can be an option for the commercial customers that can't use LGPL'ed code. Change-Id: Ibbefa160711820fb6235aa312a375e1b1b9d0b16 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Sami Makkonen <sami.makkonen@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Always get the default flags from QAIM.Stephen Kelly2012-11-272-2/+2
| | | | | Change-Id: I9171bce02bc1cd0973fee43af1774f887b4f8668 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix scriptdebugger exampleChristian Stenger2012-11-271-1/+2
| | | | | | Task-number: QTBUG-28128 Change-Id: Ifb57fa5e5dc2fa1959e8f04861897f59d3ce635d Reviewed-by: hjk <qthjk@ovi.com>
* Compile fix for example after changes to QApplication constructorAndy Shaw2012-11-242-10/+2
| | | | | | | | As QCoreApplication::Type is no longer public then change this to use QCoreApplication instead as the example does not need a GUI application. Change-Id: I24f98ec6538fc3f4bfc8612defbb6e7bb4dbf9aa Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix build of installed examples.Friedemann Kleint2012-11-211-1/+1
| | | | | | Task-number: QTBUG-27977 Change-Id: I26a85995367d79c0a88f3e8a6e8a4fc15caf9094 Reviewed-by: hjk <qthjk@ovi.com>
* Merge branch 'newdocs'Eskil Abrahamsen Blomfeldt2012-11-201-1/+0
|\ | | | | | | Change-Id: If2ee8fc472ef47e24967c29f5ba39b92e4b41098
| * Doc: Removed the HTML template from the .qdocconf filesJerome Pasion2012-10-291-1/+0
| | | | | | | | | | | | | | -qt-module-defaults.qdocconf already contains the HTML template. Change-Id: I8f4ce0d4f7b9a5a713f8b6ad81828c00f3607b27 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | autotests were moved to qtbase as they have no real script dependencyOliver Wolff2012-11-0827-3012/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-27705 Task-number: QTBUG-27706 Change-Id: I1bd17444b5ba8effba52bf4c179751f25a9d5974 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | adjust to qt_plugin.prf changesv5.0.0-beta2Oswald Buddenhagen2012-11-011-4/+3
| | | | | | | | | | | | | | | | DESTDIR and INSTALLS+=target are set up automatically now, but PLUGIN_TYPE needs to be defined. Change-Id: I7f9c80f78e421ade15621459c600c94e01488667 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | CMake: Remove obsolete test_modules testStephen Kelly2012-11-013-81/+0
| | | | | | | | | | | | | | The generated module_includes test is a super-set of this test. Change-Id: I74f0abb3f577306b9cd5161a297458902d6da2e7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | CONFIG+=uitools is deprecated. Use QT+=uitools insteadSergio Ahumada2012-10-312-4/+2
| | | | | | | | | | Change-Id: I19adcb6365cae2afa9cc994f21891bad8a26690e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | CMake: Test module includesStephen Kelly2012-10-311-0/+7
| | | | | | | | | | Change-Id: Icc2d86758f43c89493b2ef3afee913c22e2a1b88 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Fixed compile with -no-widgetsRohan McGovern2012-10-262-1/+12
| | | | | | | | | | | | | | | | | | Disable tests which need QtWidgets when that module is not available. Note that a missing QtWidgets also implies a missing QtScriptTools. Change-Id: I59ae3c25cfebf24ec9f8418b78b8b9f8c1caa7e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix mmap usage.Jędrzej Nowacki2012-10-221-2/+2
|/ | | | | | | | | | Add missing MAP_NORESERVE, and fix error checking. Special thanks to Olivier JG for debugging the issue. Task-number: QTBUG-27322 Change-Id: Ic4d5aa5849b9b5500fd3065aad5c86dd089a850b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update docs after modularization of docsTor Arne Vestbø2012-10-115-756/+4
| | | | | | | | | The global files now live in qtbase only, and are made available to the other modules via the $QT_INSTALL_DOCS variable. Change-Id: Ia10e092bb6780d379dacafe0a10a6b78ce7f9a6c Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Updated include statements to point to the doc/global templatesVenugopal Shivashankar2012-09-281-2/+2
| | | | | Change-Id: Ifdf1bb4b4bbb77cb8f5d5d4a3a6108763b672c57 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* HTML template: Updated copyright notice from Nokia to Digia PlcJerome Pasion2012-09-262-27/+2
| | | | | Change-Id: I3bd323c9ff89feadc9a8efa1f04a91124e03d3ec Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix header guardLars Knoll2012-09-251-0/+1
| | | | | Change-Id: I22bba8d2d175d787913d1e2269ad2ca8ff762043 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Changed title of Qt Script module pageGeir Vattekar2012-09-241-1/+1
| | | | | Change-Id: I9d4f8b6b3af98bb8cc7a4b773a5c663691e5476b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-24320-5302/+5302
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Id0b72b8c895b0eab04a740bf83859c9b646dd911 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc:Adding documentation templates from qtbaseJerome Pasion2012-09-213-0/+776
| | | | | | Task-number: QTBUG-27293 Change-Id: I3b9a035aa44187dc25967c0e8a96854f0d6307e1 Reviewed-by: Martin Smith <martin.smith@digia.com>
* fix examples/script/qscript for MSVCJoerg Bornemann2012-09-141-1/+1
| | | | | | | | | | The example needs no_batch in CONFIG because examples/script/customclass and examples/script/qscript contain a main.cpp and nmake's inference rules get confused which one to choose. See QTBUG-13496 for details. Change-Id: Ia5b06d985504ff4e72ea5e492a623edce252f57a Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
* Tests: Use qInstallMessageHandlerKai Koehne2012-09-141-4/+4
| | | | | | | qInstallMsgHandler got deprecated in Qt 5. Change-Id: I4da748659f232d8b0fe4b16fe9cf83290762dd2c Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-114-6/+1
| | | | | Change-Id: I1d95fe8089d8384563654630b9f4b201245887b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix MinGW-w64 compilationJonathan Liu2012-09-041-1/+1
| | | | | | | | | | ENABLE_EXECUTABLE_ALLOCATOR_FIXED requires sys/mman.h which is not available with MinGW-w64. Change-Id: I6e76ce0c570e5819657debf813f0e80cef907dd4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Yuchen Deng <loaden@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Update the git-archive export optionsThiago Macieira2012-09-032-2/+4
| | | | | | | | | | | | | | The .gitattributes and .gitignore files do not need to be present in packaged sources, as they are for people using the Git repository. People who download tarballs usually don't reimport into Git -- they should just download the actual repositories. Meanwhile, the .tag file is quite useful. Instead of making Git extract to the useless SHA-1 of the $n string, ask git-archive to store the SHA-1 of the commit being packaged. Change-Id: I203c273457977a1d5b2d4795cdcdd81b7b64549c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add doc/qtscript to .gitignorev5.0.0-beta1Yuchen Deng2012-08-271-0/+1
| | | | | Change-Id: Id2042fa8c34601728381382573dee1ebc80dbbcd Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Capture full backtrace when a native function calls back into JSKent Hansen2012-08-222-2/+51
| | | | | | | | | | | | | | | | | | | | | | Commit df0ec196031d33850324dc5eeed2d71f61413885 assumed that JSC's Interpreter::throwException function is called exactly once when an exception occurs. That's wrong. If there is a native call inbetween two JS calls on the stack, the call stack will be unwound to the point of the native call frame, and throwException will return. After the native (C) call frame has been unwound, throwException will be called again to unwind remaining JS call frames, and so on. This was causing QtScript to discard the backtrace belonging to the inner-most JS frames; the backtrace would be regenerated from a partially unwound state. Fix this by ignoring subsequent calls to the uncaughtException() callback once a backtrace has been captured; the backtrace is already cleared before each evaluation is started. Task-number: QTBUG-26889 Change-Id: I03e1d60fbac5e592cff1dd5ef70f397cf94454ae Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Remove the use of the QWidgetStar metatypeid.Stephen Kelly2012-08-156-14/+165
| | | | | | | | | | It is to be removed, and is obsoleted by QMetaType::PointerToQObject. By using QMetaType::PointerToQObject, we also gain the feature that all pointers to types derived from QObject return true for QScriptValue::isQObject(). Change-Id: I18392b5b6cde3a45d060c37612d987a5cf8e8f18 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make QScriptEngine::uncaughtExceptionBacktrace() work againKent Hansen2012-08-157-29/+90
| | | | | | | | | | | This function has been broken since Qt 4.6 (when the JavaScriptCore- based back-end was introduced). Fix it by introducing a callback in JSC that allows us to capture the stack when an uncaught exception occurs. Task-number: QTBUG-6139 Change-Id: I4a829323c9fb0c8b2f16a2e5d6f0aeb13cc32561 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove dead code from backtrace autotestKent Hansen2012-08-151-35/+0
| | | | | | | | | | | | With the JSC-based back-end, Error objects don't have a "stack" property, and there is no Error.backtrace() function. Commit a670b4756885b106db04651cd2a7030e02f0cc2f removed all mention of them from the documentation, but not from the autotest; this code wasn't reached anymore because of a preceding QEXPECT_FAIL in the autotest function. Change-Id: Ib34cbd5edff126137cec02bf68624e4a102ace84 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add default conversion for types long and ulongKent Hansen2012-08-144-0/+94
| | | | | | | | | | | | | | Such conversion is not guaranteed to be lossless on all platforms, but it's still reasonable to support these types by default. JSC::JSValue already had constructors for them. The type matching / overload resolution in the QObject binding already handled long and ulong, but the value conversion itself was missing, for some reason. Task-number: QTBUG-2124 Change-Id: I14ff29a8e949403234b7659c0aca8b48bcdbda0e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Suppress JavaScriptCore 'LEAK' messages at application exitKent Hansen2012-08-132-0/+5
| | | | | | | | | | | | | | | | | | In debug mode, if a QScriptEngine was never destroyed, JavaScriptCore would output a message like LEAK: 120 Structure on stderr at exit. This is not terribly helpful to users; also, it's not common for Qt classes to produce such output. Since JavaScriptCore's only usage of the logging facility is for reporting these "leaks", we can disable logging altogether. Task-number: QTBUG-18201 Change-Id: Id598bd1f48129d821a954cc49d8e3ab715d78426 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* make use of QT_PRIVATE to specify private Qt dependenciesOswald Buddenhagen2012-08-111-3/+1
| | | | | Change-Id: I05b18befb71ef0483ee5a40dab6163f0612782e0 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* follow rename of qt_module_config.prf to qt_module.prfOswald Buddenhagen2012-08-112-2/+2
| | | | | Change-Id: Ied05f26ee735d63a89a5bcf9b7afbeaa8e70809c Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix GC issues related to QObject connections and ownershipKent Hansen2012-08-096-38/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue 1: Even if a sender object was only weakly referenced, the connection's slot function would still get marked. If the slot was a closure, its scope could hold a reference to the sender object, so by marking the closure, the sender would get marked, too - even if there were no other references to the closure outside of the QObject connection structure. This would cause the sender object to stay alive, rather than being garbage-collected (i.e., it leaked). Issue 2: It's possible that a closure used as a slot in a connection for one QObject holds the only reference to another QObject that has connections of its own. In that case, if the first object is explicitly referenced, the second object (and its connections) should get marked. But depending on the order in which the connections were marked, the second object might get treated incorrectly. This commit solves both issues by introducing an iterative scheme for marking connections. The first pass marks only connections whose sender object is referenced elsewhere in the JS environment. The second pass marks connections whose sender object is referenced by slots of the connections marked in the first pass. And so on, until no more connections should be marked. At that point, any remaining unmarked connections are effectively dead (belonging to QObjects that can be reclaimed by the GC). Task-number: QTBUG-26590 Change-Id: I50aa66f7fe407a6827b6f2a12e027275a2fb4655 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Move test helper function to separate header fileKent Hansen2012-08-094-15/+64
| | | | | | | | Makes it possible to use the collectGarbage_helper function in other autotests too (e.g., tst_qscriptextqobject). Change-Id: I4fefa36aba13ebf9f931f0e2b90d7ddbc0036a6c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add qtscriptglobal.h for the qtscript.git module EXPORT macrosThiago Macieira2012-08-0910-1/+80
| | | | | | | | No library other than the core libraries should depend on their export macros being in qglobal.h. Change-Id: I6ded70813f6296ca5aa1d7d3cdb38503a5538424 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* QScriptEngine::pushContext(): Don't inherit parent context's scopeKent Hansen2012-08-084-22/+36
| | | | | | | | | | | | | | This was a regression introduced in Qt 4.6 (JavaScriptCore-based backend). pushContext() should always create a context with a "clean" scope (only the Global Object and the context's own activation object should be in the scope chain). The scope chain API is internal, but the wrong behavior could still be observed e.g. through QScriptEngine::evaluate(). Task-number: QTBUG-18188 Change-Id: I138dabc665d7275fb85d3b5e1b473d56096a989e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix JIT crash on x86-64 (avoid 32-bit branch offset overflow)Kent Hansen2012-08-068-39/+84
| | | | | | | | | Cherry-picked from webkit commit a5b3261a8c4386b4e14ce40a34c7fc933a5f7001 Task-number: QTBUG-23871 Change-Id: Ia028fe072b349e3a7883ae0f6f7298941cc1bc9e Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-0131-0/+31
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I432719e9520662c9dda5eaa580f0b508de4120fe Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fixed compile without QtWidgets, unify "is module available?" syntaxRohan McGovern2012-07-302-1/+7
| | | | | | | | | | | If QtWidgets is not available, disable a few examples which need it. Standardize on isEmpty(QT.widgets.name) in preference to contains(QT_CONFIG,no-widgets). Change-Id: I00335149a75911dd4ab42a4ce659889d548a8be3 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Test that the package configs for QtScript work.Stephen Kelly2012-07-195-0/+97
| | | | | Change-Id: I044409a384a1931c7727cc679fb54a87be627a45 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix QScriptContextInfo::functionMetaIndex() for overloaded slotsKent Hansen2012-07-134-66/+130
| | | | | | | | | | | | | | | | | | This was a regression against the pre-JavaScriptCore implementation, where we used to store the selected method index as an internal member of the QScriptContext(Private). But in the JSC-based implementation, QScriptContext is implemented as a pointer to a JSC::CallFrame, and there are no unused fields in CallFrame where the method index can be stashed. Refactor the Qt method call logic so that the method selection is separate from the actual processing of the target method. This way, QScriptContextInfo can compute the method index the same way that the actual method call did. Task-number: QTBUG-6133 Change-Id: I619fa8b91542d0b6ab5a44b00266cc0705c95823 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Check that property descriptor members are valid before using themKent Hansen2012-07-121-2/+2
| | | | | | | | | | | | | | | | | Even if getPropertyDescriptor() returns true, it's not guaranteed that PropertyDescriptor::setter() or PropertyDescriptor::value() returns a valid JSC value. This code is in an "#ifdef QT_BUILD_SCRIPT_LIB" block, i.e. a patch we added on top of the original JSC sources. The lack of checks caused the getter-in-prototype and indexed-accessors tests from the V8 test suite to assert in debug mode. Task-number: QTBUG-17915 Change-Id: I568d83f2f80b28871ea0d934a8e33078ac8aa3ad Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* use centralized handling of QT_BUILD_PARTSOswald Buddenhagen2012-07-111-21/+1
| | | | | Change-Id: Iab5e01b2254bbf826551c3f4c8309d303d314136 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>