aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
Commit message (Collapse)AuthorAgeFilesLines
* Remove QQmlV4HandleUlf Hermann2019-04-101-10/+6
| | | | | | | | This is just an alias for QV4::ReturnedValue. We can as well use the latter. Change-Id: Ibd2c038a3ca726b39a8f0f05e02922adb9fccbdb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update plugins.qmltypes for Qt 5.13Kai Koehne2019-03-131-3/+20
| | | | | | | | Task-number: QTBUG-73484 Change-Id: I089f5122817a4da1fce13f55d2975240d741b9f6 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-131-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
| * Doc: Fix link issuesNico Vertriest2019-02-281-1/+1
| | | | | | | | | | Change-Id: I0e08820a6d25996fe27118f05214ff63d695d24e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Properly revision new TestResult slotsKai Koehne2019-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | Make sure the slots added in 028617688b0f86ac are only available with import QtTest 1.13 Change-Id: I93aa6ff6595ddc4c4583f1785bd19d489793a5f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-291-3/+0
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/masm/yarr/YarrJIT.cpp src/qml/compiler/qv4instr_moth.cpp src/quick/handlers/qquicksinglepointhandler_p.h src/quick/handlers/qquicktaphandler.cpp src/quick/items/context2d/qquickcontext2d.cpp Done-With: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I109453131f9f0a05316ae37c7d6ed1edc8c0f9d4
| * TestLib: Remove outdated note from TestCase.mouseDragJoerg Bornemann2019-01-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs of TestCase::mouseDrag say "Note: this method does not imply a drop action, to make a drop, an additional mouseRelease(item, x + dx, y + dy) is needed." However, you can find that exact line at the end of the function. This commit removes this note and amends 73131271. Change-Id: I601ed441e23e9ed66a08fd0f1d23ff5bbb5bc091 Fixes: QTBUG-72954 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: Fix Qt Quick Test documentationMitch Curtis2018-12-142-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add qtquicktest-cppapi.qdoc for the C++ API landing page. - Add qtquicktest.qdoc for the QQuickTest namespace. - Add qtquicktest-qmltypes.qdoc for the QML types landing page. - Add ../../imports/testlib to the sourcedirs variable so that the QML files can be found. - Add a "Reference" section to qtquicktest-index.qdoc that has links to the QML and C++ pages. - Add more targets so that we can reliably link to them while keeping the nice short section names. - Fix minor issues in existing documentation. - Link to the QML API docs from the C++ API docs. Change-Id: I5fc3c90105b095d9ea84c3f76e6c7ba0a47c2695 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | TestCase: add isPolishScheduled() and waitForItemPolished()Mitch Curtis2018-12-101-0/+69
|/ | | | | | | | | | | | | | | | These were introduced to the C++ QQuickTest namespace in 40d6072b and 7a3cad06, respectively. QML-only tests should also have access to them. [ChangeLog][QtQuickTest][TestCase] Added isPolishScheduled() function to allow checking if updatePolish() has been called on an item since the last call to its polish() function. This is useful to verify that a polish has been scheduled. [ChangeLog][QtQuickTest][TestCase] Added waitForItemPolished() for verifying that updatePolish() was called on an item. Change-Id: I3e3a488197e74546358e2d5b0da7a902793c1954 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Qt Quick Test: support tags filter on tests runKirill Burtsev2018-11-152-19/+54
| | | | | | | | Implemented logic for filtering tests with 'case::function:tag' run syntax. Fixes: QTBUG-71645 Change-Id: I9243636b098b4e9ccb4c74d08679bbbb9f3e8a65 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix TestCase::skip to ignore rest of the data rows in TestCaseKirill Burtsev2018-11-071-0/+1
| | | | | | | Fixes: QTBUG-53131 Change-Id: Ic24fe4b5db0e404b1b089a054ce76265763f2682 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update plugins.qmltypesKai Koehne2018-09-061-2/+2
| | | | | | | | | | | | | by running cd qtdeclarative/imports; for path in `find . -name Makefile -print`; do pushd `dirname $path`; make qmltypes; popd; done in the build directory. Local file paths in the command line were then edited out by hand. Task-number: QTBUG-70264 Change-Id: I931604aff6a779915708395e8b8dbdf659cbd637 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-252-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
| * Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-192-2/+2
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Remove the code to manually initialize resources in static buildsSimon Hausmann2018-05-021-8/+1
| | | | | | | | | | | | | | | | | | After commit be9a56e5e3ced5d0d668fa24e4c65ae928f2e25a in qtbase, this is not needed anymore. Instead the resource system injects the plugin entry point with a reference to all resources. Change-Id: I7275029bd4c15eda6bb8c2ab7ae8c1cd3933aedb Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-211-1/+1
|\| | | | | | | Change-Id: Ibeba10bc821a01125a485df48a0bc88c45c01a73
| * Document latest QtQuick.Test import version to be 2.11Kai Koehne2018-04-201-1/+1
| | | | | | | | | | | | | | | | | | Since commit 214fbaa57b73296a0 the latest minor version of the import is automatically the Qt minor version, so let's also document this. Change-Id: Ie2fe1d172898bd0d51f0841c078abd1f8ab8d744 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | testlib: Support regular expression ignores in ignoreMessageRobin Burchell2018-04-091-0/+18
|/ | | | | | | | | | | | This is a feature C++ has that the QML side lacked. [ChangeLog][Qt Quick Test][TestCase] ignoreWarning now supports ignoring regular expressions as well as strings. Task-number: QTBUG-47111 Change-Id: If3b7b78365e60f1d8d276050ba7e00fac43400e1 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* add qmlRegisterModule to all QML plugins (QUIP 99)Shawn Rutledge2018-03-211-0/+3
| | | | | | | | | | | | | | | | | Now it should always be possible to do import QtQuick.Module x.m where x is the module's major version and m is Qt's minor version. [ChangeLog][QtQuick][Important Behavior Changes] In Qt 5.11 and newer versions, QML plugin modules are available with the same minor version as the Qt release minor version number. For example it's possible to import QtQuick.Window 2.11 or import QtQuick.Layouts 1.11 even though there haven't been any API changes in these modules for Qt 5.11, and the maximum possible import version will automatically increment in future Qt versions. This is intended to reduce confusion. Change-Id: I0d28ed04d186bcdd5acde95b8ed0b66c1c4697e3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-271-1/+1
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QuickTest: declare a missing QtQuick.Window dependencyJ-P Nurmi2018-02-211-0/+1
| | | | | | | | | Since fdb8226, TestCase.qml imports QtQuick.Window 2.0. The dependency must be explicitly declared in static builds. Change-Id: Ia7d3d19573e2c5b49a21d7b833830d29b5ea4f55 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove double indirection between QJSEngine and QV4::ExecutionEngineUlf Hermann2018-02-021-3/+3
| | | | | | | | As QJSEngine's handle() method is internal, we can redefine it to return a pointer to an ExecutionEngine. That makes many things easier. Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Give Qt Quick Test its own documentation moduleMitch Curtis2018-01-262-2/+2
| | | | | | | | | It has its own QML types, so it makes sense. This also makes it easy to add documentation for C++ types later on. Task-number: QTBUG-50064 Change-Id: Ifc302c7d547d806f2ea7674dfecddf36cc1e258f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-12-203-6/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/pointerhandlers/flickableinterop/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/flickableinterop/data/Slider.qml tests/auto/quick/pointerhandlers/flickableinterop/data/TapHandlerButton.qml tests/auto/quick/pointerhandlers/flickableinterop/data/flickableWithHandlers.qml tests/auto/quick/pointerhandlers/multipointtoucharea_interop/data/pinchDragMPTA.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/DragAnywhereSlider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/Slider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/draggables.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/multipleSliders.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/Button.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/buttons.qml tests/manual/pointer/content/FakeFlickable.qml tests/manual/pointer/content/FlashAnimation.qml tests/manual/pointer/content/MomentumAnimation.qml tests/manual/pointer/content/MouseAreaButton.qml tests/manual/pointer/content/MouseAreaSlider.qml tests/manual/pointer/content/MptaButton.qml tests/manual/pointer/content/MultiButton.qml tests/manual/pointer/content/ScrollBar.qml tests/manual/pointer/content/Slider.qml tests/manual/pointer/content/TapHandlerButton.qml tests/manual/pointer/fakeFlickable.qml tests/manual/pointer/flickableWithHandlers.qml tests/manual/pointer/flingAnimation.qml tests/manual/pointer/joystick.qml tests/manual/pointer/main.cpp tests/manual/pointer/main.qml tests/manual/pointer/map.qml tests/manual/pointer/map2.qml tests/manual/pointer/mixer.qml tests/manual/pointer/multibuttons.qml tests/manual/pointer/photosurface.qml tests/manual/pointer/pinchDragFlingMPTA.qml tests/manual/pointer/pinchHandler.qml tests/manual/pointer/singlePointHandlerProperties.qml tests/manual/pointer/tapHandler.qml tests/manual/pointer/tapWithModifiers.qml tests/manual/shapestest/main.cpp Change-Id: I4f233a521305fab1ebfecbac801da192434ed524
| * QmlJs: update plugins.qmltypesMarco Benelli2017-12-141-3/+9
| | | | | | | | | | Change-Id: I3df1210088f877d4fe1d7953982e0fd2fa6ad3db Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * testlib: add key sequence functionLiang Qi2017-11-032-3/+24
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][QtTest] Added keySequence() function in TestCase. Task-number: QTBUG-53381 Change-Id: Iea25410d40fc0745e16a10c1af35ec81c4c83668 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-061-4/+4
|\| | | | | | | Change-Id: I1ed923d72566af663555898c3ec708191eef8ae9
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-241-4/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| | * Fix outdated FDL license headerKai Koehne2017-10-171-4/+4
| | | | | | | | | | | | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-1/+1
|/ / | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | qmltest: Enumerate test cases / functions without evaluating QMLTor Arne Vestbø2017-09-131-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most, if not all, QML tests are written without any sort of dynamic instantiation of the test data, so doing view.setSource() will evaluate the whole source file, compute bindings, create items, windows, etc. This is less then ideal when all you want is to list the test functions using -functions, or when running a single test from the command line, as in both cases we'll still actually evaluate every single QML file. This makes it really hard to evaluate test output, e.g. from the CI, especially with logging enabled, as even if a single test is requested, the logs are filled with results from the loading of the other tests. To improve the situation we use a non-instantiated QML component that we then inspect its compilation data, looking for test cases and functions. In the future the implementation of TestCase's qtest_run* machinery should be built on top of QTestLib instead of being reimplemented in JavaScript, but this is left for later. Change-Id: Ie5448208daf786e335583ab6bdfbc195891ec1f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-051-3/+3
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgrenderloop.cpp Change-Id: Idd7106995b5545fcac869e9056a365ef9edb36ca
| * Doc: Fix capitalization in section titlesTopi Reinio2017-08-291-3/+3
| | | | | | | | | | | | | | | | ...and fix some section titles to be less confusing. Change-Id: If83c3faffead9e2e9be7fc0fb360f1c5b8b1bb51 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* | Revert "Make QtQuickTest::mouseEvent use QTest::mouseX"Jani Heikkinen2017-09-041-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | It seems this is causing QTBUG-62925 and QTBUG-62926 so revert is the best option at this point to proceed This reverts commit 4c46dce8fd9c9dddddd1d07f56396b3eabb2efc4. Change-Id: Ia8ea85c1ac1ada1752b29c9fbd8439f5963d46d2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Make QtQuickTest::mouseEvent use QTest::mouseXAlbert Astals Cid2017-08-301-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | Fixes QQuickItem::isUnderMouse returning wrong information when moving the mouse cursor with QtQuickTest::mouseX Also changes TestCase.mouseDrag to actually resemble more what real life does, i.e. send mouse moves with the same localPos if the item has already moved and update tst_drag.qml accordingly Change-Id: I80e4ab097da90d21ba987466c1b82467755a6b56 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-08-181-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/qml/qqmlcustomparser.cpp src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypenamecache.cpp src/qml/qml/qqmltypenamecache_p.h src/qml/qml/qqmltypewrapper.cpp src/qml/qml/qqmltypewrapper_p.h src/qml/qml/qqmlvmemetaobject.cpp src/qml/util/qqmladaptormodel.cpp Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
| * Use QQmlType by valueLars Knoll2017-08-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | QQmlType is now refcounted, and we need to use it by value, to control it's lifetime properly. This is required, so we can clean up the QQmlMetaTypeData cache on engine destruction and with trimComponentCache() Task-number: QTBUG-61536 Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-151-0/+4
|\| | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp Change-Id: I3c41b9fc9ba7d41741e4dd400402ae80dd7726d9
| * qmltest: fix compare() for urlsLiang Qi2017-06-141-0/+4
| | | | | | | | | | | | | | | | url is object, but without any property. Task-number: QTBUG-61297 Change-Id: I68b0523be54e4d42f57267205ba8d66ff4ac4e30 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | TestCase: Grow some new functionality on grabImageRobin Burchell2017-05-111-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some meta-information about the image that we can use to do slightly stronger checks than just blindly poking pixel data (width & height props). In addition, when a test of a grabbed image fails (which they certainly do), it is always nice if we can perform some diagnostics. To this end, add a save() method to save the grabbed QImage to disk. Tests for the new functionality are blacklisted on Linux at present, as they do not yet appear stable, inheriting the other tst_grabImage flakiness. [ChangeLog][QmlTest] The returned object from TestCase::grabImage now has 'width', 'height', and 'size' properties for additional verification. In addition, there is a save() method to be able to persist the grabbed image to disk (for diagnostics purposes, for example). Change-Id: Ic651e0257102c514c39c3f648c05870f9d9c52e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Error out if TestCase.verify receives more than 2 parametersAlbert Astals Cid2017-04-051-0/+3
| | | | | | | | | | | | Change-Id: I3299f602970067aaef290d4f1c7449d3ab03fb3c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | TestCase: Use the new instanceof support for QML types to ensure we have an ItemRobin Burchell2017-04-041-20/+38
|/ | | | | | | | | | | | | Using !item is not enough in a loosely-typed language like QML. Previously, passing numbers to these methods (for example) would have worked in misleading ways, or not at all. We allow Window here too as for the most part it is useful, and some tests actually use it. Change-Id: I99de081798d1c503d0b01dc99ca095654cf58aa4 Reported-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update plugins.qmltypes for 5.9Marco Benelli2017-03-131-1/+41
| | | | | Change-Id: I5e6dbd2012718890f5fcc92beebcd1829dc53a57 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* TestCase: make parent argument to createTemporaryObject optionalMitch Curtis2016-12-211-7/+1
| | | | | | | | This matches the behavior seen from Component's createObject() function. Change-Id: I83fe73a588d04c5efd30c49059bb19e7584bef48 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* TestCase: don't try to access destroyed temporary objectsMitch Curtis2016-12-211-1/+2
| | | | | | | | | | | | | | | | | | Objects created with createTemporaryObject() and createTemporaryQmlObject() can be destroyed manually before the test ends. Before this patch, there would be a type error when trying to check if the object still exists in qtest_destroyTemporaryObjects(). The error seems to stem from the fact that objects that are stored in an array and later destroy()'d are not nullified, but rather left in a corrupt state. See the linked bug for more information about this. We work around this issue by checking for the existence of the destroy() function on the object before attempting to call it. Task-number: QTBUG-57749 Change-Id: I0f6ddd47d86af6fb87392c2992f9f6143af6aab8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-2/+8
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Fix SignalSpy with QQmlPropertyMap signalsAlbert Astals Cid2016-11-301-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | 2e7d4ecdc59942b484159ca827f5d5dbc8787a1b caused the regression. To fix the regression I try accessing the signal name first and if it is not a function try accessing the handler name. Comes with a unit test to test both cases. Change-Id: I3897f344df9c6219636c70259eed503d9b76f09e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | TestCase: add createTemporaryObject(), createTemporaryQmlObject()Mitch Curtis2016-12-142-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A typical pattern with QML tests is to dynamically create an item and then destroy it at the end of the test function: TestCase { id: testCase name: "MyTest" when: windowShown function test_click() { var item = Qt.createQmlObject("import QtQuick 2.0; Item {}", testCase); verify(item); // Test item... item.destroy(); } } The problem with this pattern is that any failures in the test function will cause the call to item.destroy() to be skipped, leaving the item hanging around in the scene until the test case has finished. This can result in interference with future tests; for example, by blocking input events or producing unrelated debug output that makes it difficult to follow the code's execution. By calling e.g. createTemporaryQmlObject() instead, the object is guaranteed to be destroyed at the end of the test function: TestCase { id: testCase name: "MyTest" when: windowShown function test_click() { var item = createTemporaryObject("import QtQuick 2.0; Item {}", testCase); verify(item); // Test item... // Don't need to worry about destroying "item" here. } } [ChangeLog][TestCase] Added createTemporaryObject() and createTemporaryQmlObject() functions that can be used to ensure that dynamically created objects are destroyed at the end of each test function. Change-Id: I483342052462aa86464c86bf2082892712dceb58 Task-number: QTBUG-56361 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Add touch event support to qmltestJeremy Katz2016-12-063-0/+214
|/ | | | | | | | | [ChangeLog][QuickTest] Add support for simulating touch events from TestCase. Task-number: QTBUG-23083 Change-Id: Ic045e00a91b8270b6f08d398323e06b576615e79 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>