aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest/events
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in qmltest/events/tst_touchJan Arve Sæther2017-10-051-4/+4
| | | | | | | | | | | The "internal" MPTA was a child of the "touchArea" MPTA and was covering the region (50,0,100x50). Thus, it extended vertically from the top down to y-pixel position 50. (QRects are inclusive) Sending a touch event to (50,50) would therefore hit the internal MPTA, but the test expected it to hit the outer MPTA. Change-Id: I648f004c56b59f4968d54bf14d2c1908610e93ed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Revert "Make QtQuickTest::mouseEvent use QTest::mouseX"Jani Heikkinen2017-09-042-60/+51
| | | | | | | | | | | | | 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-302-51/+60
| | | | | | | | | | | | 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/dev' into wip/pointerhandlerShawn Rutledge2017-05-081-0/+1
|\ | | | | | | Change-Id: Ia06843de255547174efa556b1ab76be4b4be4287
| * qmltest: Split into separate testsRobin Burchell2017-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running everything in one big process has high risks of problems caused by globally mutable state. It also makes running small subsets of the tests more painful than it needs to be. Make use of the new QML-only test support in qtbase to have one project per subdirectory instead. This means no more C++ "stub" binary (just run make check or qmltestrunner in the directory). This relies on qtbase/727da2965caa8bccf8bbfbdd571ed05b35251f82. Change-Id: I0da70dba19aa54e456cd183b4b6b245ee20b1f3a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/pointerhandlerShawn Rutledge2017-02-021-3/+3
|\| | | | | | | Change-Id: I734539161beb99d37b9d297c536ae154c888b736
| * fix test_mouseDrag on RHEL 7.2Shawn Rutledge2017-02-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mouseDrag(item, x, y, dx, dy, button, modifiers, delay) in TestCase.qml adds intermediate mouseMove events if dx or dy is too large (specifically if Math.round(dx/3) > dragThreshold) and that is affecting the outcome of this test. So we need to stay under that threshold. The original point of this test is from f52227f66a7af5692140ad036c06857cd2e7abcf / QTBUG-30188 : when you drag past the dragThreshold, and the dragged Item "breaks loose" and starts dragging, the initial distance that it jumps should be equal to the dragThreshold, not greater. To test it, we need to move a distance which is greater than the dragThreshold in one move event, not break it up into smaller movements. This reverts commit 432eb3344b0581ea1915840365b71376388a75b2. Task-number: QTBUG-58025 Change-Id: Ib6da69fb465b58fde1bf8ba56c4c3a1cb584f698 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | build a vector of child-filtering parents before delivery of pointer eventShawn Rutledge2017-01-271-0/+10
|/ | | | | | | | | | | | | | | | | | | | | Formerly during normal mouse or touch event delivery, sending it to the Item needed to be done via QQuickWindow::sendEvent, which would then call sendFilteredMouseEvent, which is a recursive function to visit all the item's parents, check whether filtersChildMouseEvents() returns true, if so then return early if childMouseEventFilter() returns true. This is the mechanism by which Flickable (for example) can monitor the movements of an eventpoint even while one of its children has an exclusive grab, and can steal the grab away. Now, we do this by building a vector of such parents first, then visiting them in order. It might be more efficient, it eliminates the recursion, and should eliminate the need for a QSet to ensure that we don't visit the same parent more than once. We can't change the behavior of QQuickWindow::sendEvent() because it's public API, but now we don't use it as much internally. Change-Id: I686fc5612c66eac09ec05c381a648ec65dec3923 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add touch event support to qmltestJeremy Katz2016-12-061-0/+182
| | | | | | | | | [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>
* allow quick test events to directly target a WindowJeremy Katz2016-08-221-0/+16
| | | | | | | | | | | | QuickTestEvent::eventWindow() is used to determine the window a QObject-based item cast to a QQuickItem is associated with. The window is then used to dispatch simulated events and calculate item positions. This change allows a quick Window or other QWindow-based object to be used directly. Change-Id: I85866ca4c79d5b6a48bac554608cad348aeb6e98 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Updated license headersJani Heikkinen2016-01-203-51/+36
| | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* testlib: Introduce MouseDoubleClickSequence() methodCaroline Chao2015-03-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | The existing method MouseDoubleClick() emulates the mouse double click event only. The added method MouseDoubleClickSequence() emulates the full sequence of mouse events a physical double-click would generate: Press-Release-Press-DoubleClick-Release Introducing a new method in order to provide convenience when a test requires to simulate a complete double-click action without changing the behavior of MouseDoubleClick() and risking to break existing tests. Add autotest. Task-number: QTBUG-42185 Change-Id: I1cdddd9e21d3b1d8a818f6d4e3717b06b7d70e08 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-123-21/+21
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-053-3/+3
| | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-253-57/+33
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* TestLib: Add more mouseMove in mouseDrag implementationCaroline Chao2013-04-061-0/+102
| | | | | | | | | | | | | 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>
* Smooth dragging an item with MouseArea.Andrew den Exter2013-03-141-3/+7
| | | | | | | | | | Calculate drag distance relative to the mouse position when a drag is detected rather than the press position so there isn't a large change in position on the first move. Task-number: QTBUG-30188 Change-Id: I5c2269c2228668a3842e18f65167637497b3beb4 Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-103-3/+3
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Skip flaky subtests of tests/auto/qmltest.Friedemann Kleint2012-10-221-0/+1
| | | | | | | | | | - Skip test_key_click() in events/tst_events.qml. - Skip test_pixel pixel/tst_pixel.qml. Task-number: QTBUG-27671 Change-Id: Id78c34244d346910e28a2368f9fe3a41f54b8fb9 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-233-72/+72
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve mouseWheel() functionCharles Yin2012-07-041-3/+3
| | | | | | | Use new angleDela() API and update the documentation. Change-Id: Ie01c979d8c411e81165caedc7e020e39f9d64371 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Implement mouseDragCharles Yin2012-03-131-0/+74
| | | | | | | | | 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>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-302-2/+2
| | | | | | | | | | 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: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-232-2/+2
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix missing/outdated license headers.Jason McDonald2011-09-261-1/+42
| | | | | | Change-Id: I381398b0c4f80db689a59797e2faeab5b14503eb Reviewed-on: http://codereview.qt-project.org/5491 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Wheel event support in qmltestlib + few fixes.juhvu2011-09-221-0/+47
| | | | | | | | | | added unit test and orientaion support for mouseWheel Change-Id: I9c26dc762281bc32965769c151414ac0e177ad0f Reviewed-on: http://codereview.qt-project.org/5272 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Juha Vuolle <juha.vuolle@nokia.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* increase the tryCompare timeout value to make the CI happyCharles Yin2011-07-281-3/+3
| | | | | | | Change-Id: I9561213295969f3064637584f45deb66f56c071b Reviewed-on: http://codereview.qt.nokia.com/2309 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* Update licenseheader text in source files for qtdeclarative Qt moduleJyri Tahtela2011-07-081-17/+17
| | | | | | | | Replace old license header with correct one. Change-Id: I492ddaaa0227b2c8faf11bdcd6e12e7231a54a10 Reviewed-on: http://codereview.qt.nokia.com/1312 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Integrate QtQuickTest into QtCharles Yin2011-05-201-0/+86
Change-Id: I558821c0dec9166ea1d0d2e1e2f889553c436316 Task-number:QTBUG-16082