aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Added a QML module page for Qt Quick TestVenu2013-10-232-0/+2
| | | | | | | | | | | | This should avoid the TestCase and SignalSpy types being listed in the All Classes page, which is meant for the C++ classes. Task-number: QTBUG-33316 Change-Id: I0f2f9e557df89f46f656a8820602fe5712c64073 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add classnames for QML import plugins.Morten Johan Sørvig2013-10-141-0/+1
| | | | | | | | | Needed for static builds. qmlimportscanner will read the "plugin" and "classname" entries. Change-Id: I31939451366ad3e771d516ac426525c8bcdba57d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Change exception handling APISimon Hausmann2013-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the exception handling API in the engine slightly, encapsulating any use of direct throw statements and catch blocks with concrete types. In the future we need to be able to change the way these are implemented, in order to ensure that the correct stack unwinding code is triggered for throw and re-throw. This patch separates the C++ exception object thrown from the V4 exception (that includes value, throwing context pointer) and stores the latter inside the engine. In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to move into the QV4 namespace directly. In addition the syntax for catching exceptions changes from try { ... } catch (QV4::Exception &ex) { ex.accept(context); QV4::ScopedValue exceptionValue(scope, ex.value()); } to try { ... } catch (...) { QV4::ScopedValue exception(scope, context->catchException()); } Context::catchException() checks if there's a "current" exception in the engine, and if not assumes that we caught an unrelated exception and consequently re-throws. partiallyUnwind() is also gone and replaced with rethrowException(), in order to encapsulate the re-throw. Lastly, in the future nesting try/catch blocks isn't going to be possible due to limitations in the common C++ ABI with regards to foreign exceptions. Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move Value::toInteger(double) and related to PrimitiveLars Knoll2013-09-281-1/+1
| | | | | | | Also clean up a few other direct uses of Value Change-Id: Ie27d42c1b31b9e6d16d0a60071cb5e4e1c5b9e8b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix API of QQmlV4HandleLars Knoll2013-09-261-3/+8
| | | | | Change-Id: Iac4a3fefebd33a5990408598486231a5add8e639 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmltest: Register test object as a singletonCaroline Chao2013-08-281-2/+3
| | | | | | Change-Id: I5f6c404ff2901082f22b953b29aed08d3488f31d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* TestLib: Fix regression in error location outputCaroline Chao2013-08-221-6/+6
| | | | | | | | Error location returned should be given in the test file not in TestCase.qml. Change-Id: Ifea51fe5e39890a369c4dca6754abd46d2ee9bc2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge branch 'wip/v4' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-08-063-20/+22
|\ | | | | | | | | | | into dev Change-Id: I278524d0f43d2237201d9cf78c1c36a5ecc83d84
| * Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-242-5/+37
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * | Remove last v8 dependency in the testlibLars Knoll2013-05-311-1/+3
| | | | | | | | | | | | | | | Change-Id: I68fa531a3db0becf0a449265562e8d20b9fa967f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Fix file and line number reporting of QML/JS errorsSimon Hausmann2013-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace QUrl with QString in V4 for the source location (we don't need URL parsing) * Replace line number and file in QV4::Exception with the information we retrieve from the stack trace of the exception. Fixes about five tst_qqmlecmascript tests that relied on correct file/line number information Change-Id: I2a3daa72be6c5587fd965211ea8f6fb77142e7ee Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Add support for generating stack traces to QV4::ExecutionEngineLars Knoll2013-05-221-12/+12
| | | | | | | | | | | | | | | | | | | | | This makes it possible to remove the v8::StackTrace API Change-Id: I53eee022a1030f0f6bf9a9268ca7cd3d5975724d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Remove v8 dependencies from QQmlV4HandleLars Knoll2013-05-081-2/+2
| | | | | | | | | | | | | | | Change-Id: I87d2183738ec7cfeea846a28f2b9aed79a233f68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Get rid of v8::LocalLars Knoll2013-05-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-192-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
| | | | | | | | | | | | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Allow passing a message to tryCompareAlbert Astals Cid2013-08-052-5/+13
| |/ |/| | | | | | | | | | | | | | | | | Also adds a check to make sure timeout is a number, for people that are moving from compare() to tryCompare() and forget of the extra timeout parameter Change-Id: I54e56e2014c022e06622edebca1fd36172c75009 Reviewed-by: Yunqiao Yin <charles@mazymind.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Make sure tryCompare value argument is not undefinedAlbert Astals Cid2013-05-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It happens often that people convert a compare(foo.bar, 3) to a tryCompare(foo.bar, 3) and unfortunately that succeeds but doesn't do what they expected This makes tryCompare fail if no third argument is given Task-number: QTBUG-31427 Change-Id: I0c9618dae9aad4be55aa35c3e2dcf3535728beaa Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | qtdeclarative: update .qmltypes, and use -notrelocatable optionFawzi Mohamed2013-04-241-4/+28
| | | | | | | | | | | | | | | | this should fix some bugs in the code support due to incorrec/outdated meta info Change-Id: I90925daa5376ebdfb9a6f9d73103893065c15d64 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | Doc: Fix module name formatSze Howe Koh2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Qt3D -> Qt 3D QtLocation -> Qt Location QtScript -> Qt Script Change-Id: Id59cb209e0e0407d564de0bfaab73990e64a02e6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Testlib: Fix qml objects not deleted in TestCaseCaroline Chao2013-04-111-0/+3
|/ | | | | | | | | | | After destroy() been called in the test function. wait(0) is used to call processEvents(). Task-number: QTBUG-30523 Change-Id: I208f213e2de6b530dd0965b301d046aee0182d9b Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* TestLib: Add more mouseMove in mouseDrag implementationCaroline Chao2013-04-061-0/+14
| | | | | | | | | | | | | So the cursor has intermediate states while dragging instead of jumping to the final position. This is for example useful for testing the behavior of a control during the drag. Add autotest. Change-Id: I061dd18ef7ac389aa4da4a5b60f9e128ee8c08d0 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Make keyClick/Press/Release work with a charAlbert Astals Cid2013-04-052-7/+24
| | | | | | Change-Id: Id821bddd993d4da4458464713a69edfea4aaecaa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* TestLib: add mouse release at the end of a mouseDragCaroline Chao2013-04-051-0/+1
| | | | | Change-Id: I901f23a2bc7089784ed644a53a3712669b21f417 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Fixed some uses of terminolgies in qdoc files.Jerome Pasion2013-03-262-12/+12
| | | | | | | | | | | -"element" -> "type" or "object" (not in all cases where this change applies) -some instances of QtQuick. It should be "Qt Quick". -only in qdoc files. Examples and source code changes will be done later. Task-number: QTBUG-30180 Change-Id: Ie587461a138e97606f761ad1e90909c91b479303 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-282-8/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-108-8/+8
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-238-192/+192
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add .qmltypes filesKai Koehne2012-09-123-0/+262
| | | | | | | | | | | | | | | | | | | | .qmltypes files are used by e.g. Qt Creator to provide code completion etc for QML types defined in plugins. The added files where generated with qmlplugindump, e.g. qmlplugindump QtQuick.Particles 2.0 > plugins.qmltypes (ideally make qmltypes would do the same, but it's not working as expected right now). The exception is the QtQuick plugin: Here the file is generated with qmlplugindump -builtins > plugins.qmltypes and contains also the types registered in the qml library itself. Change-Id: I1a6b6641cb5ec3ecffe08e8926d8c1bc082ae6de Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* doc: fix some typos in .qml filesSergio Ahumada2012-09-071-1/+1
| | | | | Change-Id: Ice5d60b06ec9ab81fbd98fd1679c8834f3018938 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Implement strict mode for qmldir modulesMatthew Vogt2012-07-311-0/+1
| | | | | | | | | | | | | | | Allow a module's qmldir to contain a module directive, which when present specifies 'strict mode' import processing. In strict mode, type registrations are only permitted into the namespace identified in the qmldir file's module directive. In addition, any type registrations to that namespace originating from other modules are treated as error conditions. Task-number: QTBUG-26551 Change-Id: I081bde2d3b83d3f28524440177fb2cd1ccee34ad Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-302-2/+4
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Add waitForRendering() function for qmltestCharles Yin2012-07-252-2/+18
| | | | | Change-Id: I6357412d84fdb4a8b6bd8603baba7d10a2bcc245 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Empty JSON files are not needed for the plugin systemAlan Alpert2012-07-252-2/+1
| | | | | Change-Id: I8df57ed1ced8128723d790c30c00ccaba0a2787d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add fuzzyCompare() to qmltestCharles Yin2012-07-182-20/+37
| | | | | Change-Id: I4834f4af0839fb89424ed25f0addfb618e5374f8 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* use centralized qml plugin project handlingOswald Buddenhagen2012-07-111-18/+4
| | | | | Change-Id: I27b773b042560d3a95d943ad942e84d9aaeeba40 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve mouseWheel() functionCharles Yin2012-07-042-11/+47
| | | | | | | Use new angleDela() API and update the documentation. Change-Id: Ie01c979d8c411e81165caedc7e020e39f9d64371 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add pixel comparation support to qmltestCharles Yin2012-06-122-0/+29
| | | | | Change-Id: Icdee3fab497cc46260bbb9af89f4402fdc027fef Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Doc: Sanitized QML typesNico Vertriest2012-05-242-2/+2
| | | | | | | | | | -modified \brief -checked QML modules -added qml directory to the qdocconf file -added particles directory to the qdocconf file Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Consolidate SignalSpy itemCharles Yin2012-05-012-8/+38
| | | | | | | | | | 1. Add signalArguments to track emitted signal parameters 2. Add valid property to track signal connection status 3. Make count, valid, signalArguments read only properties Task-number: QTBUG-18531 Change-Id: I08e99c1086786a0e5095bf0d04750dec33153fde Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Clean up qmltest codeCharles Yin2012-04-192-23/+1
| | | | | | | | 1. Remove qmlviewer related code from TestCase.qml 2. util.wrapper is no longer used Change-Id: I17d9198a7871762da07a790700d69504b8226c48 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix some issues with init_data() for qmltestCharles Yin2012-04-051-5/+8
| | | | | | | | | 1. should not use hasOwnProperty, replace it with 'in' 2. the default init_data() method is unnessary 3. when init_data() returns empty, the test function should run in non data driven mode Change-Id: I8cb19d3499b285d07c8b3d04abd9ddf33b1c5395 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add init_data() function for default data driven testingCharles Yin2012-04-032-6/+26
| | | | | | | | | If all or some test functions share the same test data, the test data can be put into init_data() function, this can reduce unnecessary code duplications. Change-Id: I118dd9c3c1d0f2f238aab6e25e5d8af80b3d3049 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-131-2/+2
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Implement mouseDragCharles Yin2012-03-132-0/+23
| | | | | | | | | Simulates the drag behavior by press-move-move-release mouse events, we need 2 move events here to trigger the drag threshold. Task-number: QTBUG-22753 Change-Id: Ic3470c061834b7410c524029d82375cba62afa36 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix SignalSpy disconnect issueCharles Yin2012-03-131-1/+3
| | | | | | Task-number:QTBUG-21083 Change-Id: Ic61472d886bf7c46eb37dc44b5e5ceb401917087 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-053-3/+5
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Use new plugin system in QtDeclarative.Friedemann Kleint2012-02-233-3/+5
| | | | | | | | | | | | | | | | - Use prefix "org.qt-project" for interfaces. - Use new macros, add json files. Change-Id: I53df83f95153c5c9c462098584606284470a5ae0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-244-23/+23
|/ | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>