summaryrefslogtreecommitdiffstats
path: root/src/script/api
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2932-64/+64
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Revert "Delete JS-owned QML objects right away in the engine dtor."Peter Kümmel2012-09-252-3/+1
| | | | | | | | | | | This reverts commit ecc432a5b7ae269220f86c6f0b3dd364f8643191 to fix a crash on exit. Task-number: QTBUG-20377 Change-Id: I6606ff194f2c16e06bdbbfca94e55821cf055f75 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Delete JS-owned QML objects right away in the engine dtor.Thomas McGuire2012-09-142-1/+3
| | | | | | | | | | | This prevents memory leaks when the engine is destroyed after exec() has already finished. In most cases this happens during application shutdown, at which point the event loop is never entered again. Task-number: QTBUG-20377 Change-Id: I65564ed3e56314d656d92fd66f11ae67d4eb932b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix crash when converting invalid JSValue to stringKent Hansen2012-08-031-0/+2
| | | | | | | | | | | JSC::JSValue::toString() expects that the input is valid. Cherry-picked from qt5/qtscript commit b2969c97fd808e229ff57949dbb9c683f3830b71 Task-number: QTBUG-21896 Change-Id: I534642154ffa4ae400a2ab8e5ce1f0c35899ae6e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix crash when accessing QObject properties through activation objectKent Hansen2012-08-021-0/+4
| | | | | | | | | | | | | | | | | | | Since objects in the scope chain have to be JSActivationObjects, QScriptContext::setActivationObject() creates a proxy object that should delegate access to the actual object. This case was not handled in the toQObject() conversion function, so for activation property access through evaluation (where the this-object would be the proxy object, not the actual QObject), the this-object conversion to QObject would fail, and the assert "this-object must be a QObject" was triggered. Cherry-picked from qt5/qtscript commit 44062ea8e2499f8d2061c7e5be8fb754f2ba4310 Task-number: QTBUG-21760 Change-Id: I284b70ea5c9af3a15dadd4243283afe0d00bcd5a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Update contact information in license headers.Sergio Ahumada2012-08-0132-96/+96
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Various Qt documentation bug fixes (wk 42)artoka2012-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-18101 Task-number: QTBUG-8673 Task-number: QTBUG-14194 Task-number: QTBUG-9109 Task-number: QTBUG-9466 Task-number: QTBUG-8323 Task-number: QTBUG-7924 Task-number: QTBUG-20355 Task-number: QTBUG-19367 Task-number: QTBUG-21295 Task-number: QTBUG-14554 Task-number: QTBUG-8331 Task-number: QTBUG-8329 Task-number: QTBUG-8786 Task-number: QTBUG-8787 Change-Id: I4b6403df4a0078fa385abbfab5b6c3a94f175295 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-1132-32/+32
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-05-241-9/+9
|\ | | | | | | | | | | | | | | Conflicts: src/gui/text/qrawfont.cpp src/gui/text/qtextlayout.cpp src/gui/util/qscroller.cpp src/gui/widgets/qlineedit.cpp
| * Removed some superfluous semicolonsThorbjørn Lindeijer2011-05-021-9/+9
| | | | | | | | Reviewed-by: Kai Koehne
* | Doc: Fixed qdoc warnings.David Boddie2011-05-111-1/+1
|/
* Fix compilation with QT_NO_Tasuku Suzuki2011-03-211-0/+6
| | | | | Merge-request: 1132 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging into ↵Qt Continuous Integration System2011-03-141-2/+2
|\ | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging: Deprecate QScriptValue::UserRange Deprecate QScriptValue::QObjectMember
| * Deprecate QScriptValue::UserRangeKent Hansen2011-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | QScriptValue::PropertyFlags should only represent standard (ECMA) attributes. Since we can't guarantee that the back-end will be able to retain extra "user" bits, we don't want users to write code that rely on them. Task-number: QTBUG-15571 Reviewed-by: Jedrzej Nowacki
| * Deprecate QScriptValue::QObjectMemberKent Hansen2011-03-111-1/+1
| | | | | | | | | | | | | | | | | | This property flag serves no valid use case. We don't want users to write code that depends on whether the property is a Qt/C++ property or a JS property. Task-number: QTBUG-17760 Reviewed-by: Jedrzej Nowacki
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging into ↵Qt Continuous Integration System2011-03-022-3/+15
|\ \ | |/ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging: Don't allow non-Object values to be set as prototype Enable QtScript/JavaScriptCore ASSERTs in debug mode Don't assert in abortEvaluation() autotest Avoid asserting when computing line number for backtrace Make missing line number info an expected failure
| * Don't allow non-Object values to be set as prototypeKent Hansen2011-03-021-2/+6
| | | | | | | | | | | | | | | | | | It should only be possible to set an object or null as prototype. This is consistent with both JSC and V8. Additionally, it keeps JSC from asserting in debug mode. Task-number: QTBUG-15154 Reviewed-by: Jedrzej Nowacki
| * Avoid asserting when computing line number for backtraceKent Hansen2011-03-011-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With JSC asserts enabled (QtScript built without NDEBUG defined), JSC::CodeBlock::getBytecodeIndex() would assert because we sometimes called it with an address that was not inside the range of the block's JIT code. We never caught this bug because it just so happens that even though the assert fails, the function returns a result that causes our autotests to pass. Check that the returnPC is in range and report lineNumber -1 if not; this unifies the behavior of the interpreter and JIT, even though it's not the result we want. Task-number: QTBUG-17741 Reviewed-by: Olivier Goffart
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-013-13/+33
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm src/opengl/qpixmapdata_gl.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/qtextlayout/tst_qtextlayout.cpp
| * | Make QtScript support COLLECT_ON_EVERY_ALLOCATION defineKent Hansen2011-02-251-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSC has a define in runtime/Collector.cpp that can be enabled to force garbage collection on every allocation. This can be useful when investigating GC-related issues. When the define is enabled, GC callbacks will happen before the QScriptEngine(Private) is completely initialized, so we need to initialize some things earlier (nice cleanup, actually), and add some guards in the marking callback. All tests pass with define off and on. Task-number: QTBUG-17781 Reviewed-by: Olivier Goffart
| * | Add missing API shims to QScriptValue constructorsKent Hansen2011-02-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to ensure that the calls into JSC are safe, e.g. with regards to reentrancy. I was not able to construct a testcase, but several of our autotests crash without this change if COLLECT_ON_EVERY_ALLOCATION is set to 1 in Collector.cpp (this forces a garbage collection every time an object is allocated). Task-number: QTBUG-17815 Reviewed-by: Olivier Goffart
| * | Don't crash when marking arguments object of native contextKent Hansen2011-02-252-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSC assumes that the callee is always valid, since JSC::Arguments is used for JS frames, which must have a callee. But we use JSC::Arguments for arguments object of pushContext()-created contexts, and then there is no callee. But the callee member can't be null, so now we put a fake callee there and make sure it doesn't bleed up to the public API. Alternative solution: Add "if (d->callee)" to JSC::Arguments::markChildren(), then no other changes would be needed. But we don't want to patch JSC any more. Non-solution: Subclass JSC::Arguments and reimplement markChildren() to temporarily set a dummy callee during marking. Can't be done, as JSC::Arguments::d is private (again, we don't want to patch JSC). Task-number: QTBUG-17788 Reviewed-by: Olivier Goffart
* | | add missing includeRolland Dudemaine2011-02-221-0/+1
| |/ |/| | | | | | | Merge-request: 1101 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-171-3/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/symbian/symbian_building.prf mkspecs/symbian-gcce/qmake.conf src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/plugins/plugins.pro tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2011-02-141-3/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Don't leak ScopeChainNode's Rename 'plugins\qmldebugging' (work around qmake issues) Correct the "module not installed" error handling Flickable uses the flick velocity to determine whether to retain grab Make addImportPath() work for windows paths starting with lower case Report any exceptions occurring in WorkerScript javascript code MouseArea docs - link to onCanceled() from onReleased()
| | * Don't leak ScopeChainNode'sAaron Kennedy2011-02-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a sub-scope of the global scope chain, rather than a completely new scope chain. Leaks are difficult to autotest, but an autotest for QScriptDeclarativeClass::pushCleanContext() was added to ensure its behavior doesn't regress. To reproduce the leak (prior to this change) use: while (true) { QScriptDeclarativeClass::pushCleanContext(&engine); engine.popContext(); } Change-Id: I41ac61ea1664da569eb329c8276f2a0bb6d2f1f7 Task-number: QTBUG-17166 Reviewed-by: Martin Jones
* | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-104-5/+32
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| * | Don't crash when creating backtrace for built-in JS function (2nd try)Kent Hansen2011-02-084-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 147df10403ba280b3f04c1e3d6c4b1cf386abe5d did not quite fix the issue; other places need the same checks. When the JIT is enabled, frames for built-in JS host calls (such as Array.prototype.forEach) are not fully initialized. In particular, the CodeBlock register of such frames is not set (see comment in JITCall.cpp). We need to check if the codeBlock is actually valid before we start using it. This fixes the crash(es) but not the problem of actually getting the arguments for such frames through the API. There's also a related problem when a QtScript function (newFunction()) is called as a callback of a built-in JS host function (QTBUG-17287). These problems will go away once JavaScriptCore is updated to a more recent version (4.8 at the earliest), since the native-vs-script frame handling has been unified. Task-number: QTBUG-17137 Reviewed-by: Olivier Goffart
| * | Don't crash when creating backtrace for built-in JS functionKent Hansen2011-02-031-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | When the JIT is enabled, NativeFunctionWrapper (used for built-in functions such as Array.prototype.forEach) inherits JSFunction, so we must check whether the function is actually a JS (script) function before we start accessing script-specific properties. Task-number: QTBUG-17137 Reviewed-by: Olivier Goffart
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging into ↵Qt Continuous Integration System2011-02-091-9/+9
|\ \ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging: QScriptEngine: fix property flags for native functions
| * | QScriptEngine: fix property flags for native functionsCaio Marcelo de Oliveira Filho2011-02-091-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Fix the tests and implementation to conform with ECMA-262, property "prototype" of the function and "constructor" of the prototype object associated with the function. Reviewed-by: Kent Hansen
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-014-7/+42
|\ \ \ | |/ / |/| / | |/ | | | | Conflicts: mkspecs/features/symbian/application_icon.prf src/sql/drivers/odbc/qsql_odbc.cpp
| * Invalidate QScriptPrograms when engine is destroyedKent Hansen2011-01-284-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the engine is destroyed before the program, the program must be invalidated; otherwise the program destructor will access a stale engine pointer, which can cause a crash (it crashes on Symbian, but "only" gives a Valgrind warning on Linux for our autotests). We need to keep track of all associated programs, just like we already do for values and strings. This fix follows the exact same pattern, but uses a QSet to keep the patch minimal. No new tests, but the evaluateProgram() test runs successfully on Symbian now, and there are no more Valgrind warnings. Task-number: QTBUG-16987 Reviewed-by: Olivier Goffart
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging into ↵Qt Continuous Integration System2011-01-171-2/+2
|\ \ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-air-staging: Fix QScriptValueIterator::hasNext and QScriptValueIterator::hasPrevious
| * | Fix QScriptValueIterator::hasNext and QScriptValueIterator::hasPreviousJedrzej Nowacki2011-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | When a script engine is about to be deleted all bound iterators should be invalidated. Previously behavior of the class was not tested for the case, so new test for QScriptValueIterator was added. Reviewed-by: Olivier Goffart
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-1732-32/+32
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-1032-32/+32
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-11-251-1/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: fix performance penalty in Win32MakefileGenerator::findHighestVersion Allow QDial to wrap value when wrapping property is set. QtScript variant conversion: Convert numbers to (u)int if applicable (reviewed by khansen)
| * | QtScript variant conversion: Convert numbers to (u)int if applicable ↵Thomas Senyk2010-11-251-1/+3
| | | | | | | | | | | | (reviewed by khansen)
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-251-1/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/corelib/global/qglobal.h src/gui/kernel/qwidget_p.h src/gui/painting/qtextureglyphcache.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h src/plugins/qpluginbase.pri src/qbase.pri tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp tests/auto/qthread/tst_qthread.cpp tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qdeclarative.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| * Doc: Fixing typoSergio Ahumada2010-11-161-1/+1
| |
* | Fix QScriptValue::construct.Jedrzej Nowacki2010-11-221-1/+14
| | | | | | | | | | | | | | It is not allowed to mix values that were created in different QScriptEngine instances. Reviewed-by: Kent Hansen
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-121-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
| * Fix GC-related crash in QScriptValue::setData()Kent Hansen2010-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yet another missing API shim. When converting the QScriptValue to JSC, a JSCell may be allocated, which can cause the GC to trigger. If an identifier (JSC::Identifier) is then garbage collected, the destructor will try to remove itself from the currentIdentifierTable(). Because the API shim was missing, the identifier table was 0. It's difficult to create a bulletproof test for this case, but the attached test is a best effort (it crashes on my machine without the fix). Task-number: QTBUG-15144 Reviewed-by: Jedrzej Nowacki
* | Make qsTr() work with Unicode (non-Latin-1) stringsKent Hansen2010-11-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converting the source string/context/comment to Latin-1 is very broken, since JS strings are UTF-16. The strings should be converted to UTF-8, which should also be the default encoding for qsTranslate(). Effectively, this bug meant that only Latin-1 characters could be used in source strings; the translations themselves could have non-Latin-1 characters. But there was data loss in the case where you passed a source string for which no translation was found (since the Latin-1-ized string would be returned). Task-number: QTBUG-14989 Reviewed-by: Jedrzej Nowacki
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-10-301-4/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add autotest for QScriptExtensionPlugin Improve QtScript test coverage Don't crash when null-pointer is passed to qScriptValueFromValue() Simplify object lifetime management when moving objects to a QThread samegame: white space Move list of trusted benchmarks out of QA dungeon and into Qt Don't put Objective-C sources in SOURCES mkspecs: Emit warning when including g++.conf directly
| * | Don't crash when null-pointer is passed to qScriptValueFromValue()Kent Hansen2010-10-291-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qScriptValueFromValue_helper() (or rather, QScriptEnginePrivate::create()) will fall back to wrapping the value using newVariant(), so there is no reason for the QVariant specialization to check the return value. (In particular, if the return value was invalid, that's _because_ the engine was null, so we should definitely not call a function on the engine.) Task-number: QTBUG-14842 Reviewed-by: Jedrzej Nowacki
* | | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-291-5/+8
|\ \ \ | |/ / |/| / | |/
| * QScriptValue::construct(): Don't crash if function throws non-ObjectKent Hansen2010-10-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | If an exception occurs, we should ignore the result of JSC::construct() and return the exception value, even if the exception is not an object. This makes the behavior match the documentation: "Calling construct() can cause an exception to occur in the script engine; in that case, construct() returns the value that was thrown". Task-number: QTBUG-14801 Reviewed-by: Jedrzej Nowacki
* | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-041-2/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/snippets/code/doc_src_qmake-manual.qdoc src/corelib/arch/symbian/arch.pri src/declarative/graphicsitems/qdeclarativeflickable.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h tests/auto/qfontmetrics/tst_qfontmetrics.cpp