aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move initView() to tests/auto/quick/sharedJan Arve Sæther2019-02-111-67/+42
| | | | | | | | | | | | According to our "Coin - Flaky Tests" dashboard on our grafana, initView() in tst_qquickmousearea seems to have very few flakiness issues in actually exposing a QQuickView. It is therefore a good idea to share this implementation so that it can be used by other tests too. Change-Id: Ie83cbf7d00fa02bdd4699757471fa180945851e3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Warn, don't crash during nested delivery of mouse or touch pressesShawn Rutledge2018-10-131-0/+33
| | | | | | | | | | | | | If during delivery of a mouse press, user code calls qApp->sendEvent() with another mouse press, then when delivery of the nested event is finished, we call QQuickPointerMouseEvent::reset(nullptr). Then when delivery of the original mouse press resumes, crashes are possible because most of the code assumes that QQuickPointerEvent::m_event is not null during delivery. Change-Id: Id65b1f2f64351e40d03bcd4f4d16693d616729da Fixes: QTBUG-70898 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tests: refactor and un-blacklist tst_QQuickMouseArea::pressedMultipleButtonsGatis Paeglis2018-03-081-82/+72
| | | | | | | | | | | | | | | | | It seems that qtestlib has never really supported mouse state handling for multiple buttons (see QTBUG-64030). And the current implementation of this test relied on QGuiApplication to generate mouse releases when necessary. Since a37785ec7638e7485112b87dd7e767881fecc114, qtestlib does not rely on QGuiApplication to deduce mouse button state, but requires explicit mouse press/release events via QTest::mouse* APIs, thus causing this auto test to fail. Refactor the auto test to use QTest::mouse* APIs. This change depends on a fix for QTBUG-64030. Task-number: QTBUG-63786 Change-Id: Id24526714ec9716a0126e8288e5e8974074ebc9e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-190/+190
| | | | | | | | | | | | | 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>
* tests: Wrap qWaitForWindow{Active,Exposed} in QVERIFYv5.11.0-beta1Kari Oikarinen2018-02-231-7/+7
| | | | | | | | | | | The functions are marked Q_REQUIRED_RESULT, so they give compilation warnings when not handling the bool return value. Failing the test early at an unexpected event is also better behavior anyway. Task-number: QTBUG-66559 Change-Id: I6c4db29379ec01528208c3e4ee54346b4230616c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Support masking of QQuickItemsPaolo Angelelli2018-01-251-1/+62
| | | | | | | | | | | | | | | Adding a new property, containsMask, to QQuickItem, that can be set to any QObject defining a Q_INVOKABLE bool contains(const QPointF &point). When this property is set, the mask object contains method is used in place of the item own contains method. [ChangeLog][QtQuick][QQuickItem] Added containsMask property. Task-number: QTBUG-20524 Change-Id: I5b0696e2cddc6ae3e217ce149c5f44980fdb69aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-091-0/+70
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/memory/qv4mm.cpp src/qml/qml/qqmlbinding.cpp Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-041-0/+70
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/memory/qv4mm.cpp src/qml/memory/qv4mmdefs_p.h src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp Change-Id: I7021fa1edf076627a67048f41f7b201220262b09
| | * grabMouse() and QQWPriv::removeGrabber(): be clear whether mouse or touchShawn Rutledge2017-12-051-0/+69
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was that a MouseArea could be stuck in pressed state if a touch tap occurred simultaneously on a second MouseArea while the first was held pressed by the actual mouse. QQuickWindowPrivate::setMouseGrabber(QQuickItem *) had too little information to make the right choice in case the given item argument is null. It should not mean ungrab everything: in this use case, the mouse and the touchpoint can be pressing two different MouseAreas, and releasing either one should ungrab only the MouseArea that is being released. However the only place it was called with nullptr was in removeGrabber(), and in that context we are given all the information: which item to ungrab and whether we want to ungrab mouse, touch or both. It's better to have a little code duplication between QQuickItem::grabMouse() and QQuickWindowPrivate::removeGrabber() than to lose this information about which device(s) and Item to ungrab. Task-number: QTBUG-64249 Change-Id: I0710534a05f3ceeb66105a03ab0f32a61df8a522 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-1/+1
| | | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Enable tests for boot2qtSami Nurmenniemi2017-09-211-0/+4
|/ | | | | | | | | | | | | | Some tests needed fixing - Disabled tests too heavy for qemu - Skipped tests requiring OpenGL without support from the platform - Skipped tests requiring functionality on broken offscreen platform - Skipped tests that take too long on qemu + software renderer - Blacklisted tests for created bugs QTBUG-63049, QTBUG-63053 QTBUG-63055 and QTBUG-63057 Task-number: QTBUG-60268 Change-Id: I0346b0e436cf286d7d9cbc140acf324a4087cfb9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-0/+30
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * MouseArea: fix bug preventing dragging from startOleg Yadrov2017-02-031-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same bounded dragPos values were used for - moving the target item to new position; and - if dragging didn’t start yet, determining whether cursor moved over the threshold distance. It is right for moving the target item, but in the second case it led to that dragging did not start if the distance between item's left border and minimumX (right border and maximumX, top border and minimumY, bottom border and maximumY accordingly) was less than drag.threshold. Task-number: QTBUG-58347 Change-Id: If61a98bf734739323ef19dee6709560b754b2456 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Add pressAndHoldInterval to MouseAreaOlivier JG2016-12-161-0/+45
|/ | | | | | | | | | | | Introduce pressAndHoldInterval to allow setting the pressAndHold delay per-MouseArea. [ChangeLog][QtQml][MouseArea] Introduce pressAndHoldInterval property, which controls the elapsed time before pressAndHold is emitted. Task-Id: QTBUG-47662 Change-Id: Ic2173335033a6ed0d4b652333020f030de63a8e7 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-3/+3
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-101-0/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-301-0/+93
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | * Fix MouseArea sticky grab with drag.filterChildren enabledMartin Jones2016-09-221-0/+93
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56036 Change-Id: Iad776f42cc776e0d397173b3d2f3922eb7914392 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | Fix mouse area pressed after removal of pre-grabFrederik Gladhorn2016-08-241-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick used to actively "grab" the mouse before delivering events, making the code more complex than necessary. Some items came to rely on the behavior and now lack the ungrab event. This is triggered when inside the delivery of a mouse event, some other item grabs the mouse. If the mouse grab changed to an item that was not the target of the original delivery, the grab must have been stolen, so call mouseUngrabEvent in this case. Test case by J-P Nurmi. Task-number: QTBUG-55325 Change-Id: I2f0ac9d8aed1415662196070fb763f2752004d22 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-171-19/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h src/qml/qml/qqmlobjectcreator.cpp Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-19/+12
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| | * Fix test failure: wait between mouse events the proper wayJan Arve Saether2016-08-121-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, QTest::mouseEvent() disregards the wall time for the time stamps for events, but synthesizes the timestamps instead. The proper way is to specify the waiting time in the delay argument. This will adjust both the timestamp and perform a qWait() before the event handler is called. Without this patch, the qWait(doubleClickInterval) was disregarded, which lead to that a doubleclick event was generated, and it failed with the following message: Actual (((window->rootObject()->property("doubleClicks").toInt()))): 2 Expected (1) : 1 tst_qquickmousearea.cpp(1105) : failure location Change-Id: Ieda3b670d3cda0bd522db2f9677dad5745c88a21 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Prefer QCOMPARE over QVERIFYFrederik Gladhorn2016-07-281-3/+5
| | | | | | | | | | | | | | | Change-Id: Id57e576653cd66d1b36685737ba477c8b3ff6258 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | MouseArea: press not accepted means not pressedFrederik Gladhorn2016-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes that items that explicitly do not accept a press event, will no longer get a cancel event. [ChangeLog][QtQuick] MouseArea no longer thinks it's pressed when it does not accept the press event. When a press event is not accepted, MouseArea also no longer receives a cancel event. Change-Id: I8419cef60d7cc32aab15e9027fafb73cc08001ba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Add explanation to tst_QQuickMouseArea::moveAndReleaseWithoutPressFrederik Gladhorn2016-07-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test makes sure that no events are delivered after the initial press is released. In this context QTRY_* makes little sense, since we are confirming that the defaults have not changed. Thus rather spin the event loop 11 times and hope that if we would accidentally deliver events that we shouldn't, it will be caught in that time. Change-Id: Iadeed07a81978aa6679e5513c1fe0aebcaeeb997 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | MouseArea: add autotest for subtreeHoverEnabledShawn Rutledge2016-07-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Verify the fix in f7e462b. Task-number: QTBUG-54019 Change-Id: Ia9846f9b79473ea4f72e895320cf01d5d85cc1a3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Fix tests in tst_QQuickMouseArea for big startDragDistanceFrederik Gladhorn2016-07-061-41/+60
| | | | | | | | | | | | | | | Change-Id: I8610887e7d1d3b0c6bd9ab60e55ce1e9209bcae7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::preventStealing for big startDragDistanceFrederik Gladhorn2016-07-051-17/+29
| | | | | | | | | | | | | | | Change-Id: I38c3a663409633bd7020c2630bf11c2e46082435 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::setDragOnPressed for big startDragDistanceFrederik Gladhorn2016-07-051-11/+10
| | | | | | | | | | | | | | | Change-Id: I9f2795bcaaec2b126a41c6a6a12a2d5e55d0beee Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::cancelDragging for big startDragDistanceFrederik Gladhorn2016-07-051-4/+10
| | | | | | | | | | | | | | | Change-Id: Ia39947f7b6f42c48738af81966deb9c98f708da5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix tst_QQuickMouseArea::dragging for big startDragDistanceFrederik Gladhorn2016-07-051-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | On macOS the mouse move events go through qcursor's setPos. That in turn uses a native event, so the waits are there for a good reason. Change-Id: Icb616d303c5280f2a9ba5f78cf07032c298b84a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Improve tst_QQuickMouseArea::pressedCanceledOnWindowDeactivateFrederik Gladhorn2016-07-051-8/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it more reliable and faster - average run time goes down by ~400 ms while the test passes reliable for me after this change. Most QTRY_* will return instantly since the condition will be good in any case. On my laptop the test tended to fail roughly every 4th run without this patch. The failure was the second click on the new window not working without the QTRY_VERIFY. Removing the extra 200 ms wait time is what makes it faster - I see no good reason for the wait here. Change-Id: I5f45da91ef04a9b807ff0e9362c9d9b3881c227d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-0/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of 0e053528 was reverted in the merge, about lastTimestamp. It will be applied later in separate commit. qmltest::shadersource-dynamic-sourceobject::test_endresult() was blacklisted on linux. Conflicts: .qmake.conf tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp tests/auto/qmltest/BLACKLIST tests/auto/qmltest/qmltest.pro Task-number: QTBUG-53590 Task-number: QTBUG-53971 Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
| * Revert removal of "Fixed MouseArea threshold with preventStealing"Filippo Cucchetto2016-06-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9c8dab537819f0d999e680490c2d125b8836cbbb where commit e1400b5b4d8311769ad3b9f631479ee2b0271197 was removed due to the breakage of QtLocation tests. After some hours of debugging it seems that the problem in QtLocation was due to filtering of mouse move events in QDeclarativeGeoMapItemBase. See QTBUG-52075 Task-number: QTBUG-52534 Change-Id: I00f002c1d6f60f74a148b5a6ac2b9f63e93718a9 Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
| * Revert "Fixed MouseArea threshold with preventStealing"Michal Klocek2016-04-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit e1400b5b4d8311769ad3b9f631479ee2b0271197, which breaks qtlocation unit tests for drag support. It is no longer possible to drag markers in mapviewer. Task-number: QTBUG-52534 Change-Id: If713a8e45f64ea898f38fe3e39561ebc266403b2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * Fixed MouseArea threshold with preventStealingFilippo Cucchetto2016-04-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When preventStealing is true both keepMouseGrab() and d->stealMouse are true. This in turn enable the dragging immediately since the condition "keepMouseGrab() && d->stealMouse && !d->drag->active()" is true. Conversely when preventStealing is false the dragging is enabled in the next move event since keepMouseGrab() and d->stealMouse are set true inside the last "if" "!keepMouseGrab() && ...check threshold..". This patch adds a new boolean flag for storing if we detected a drag motion (so we exceeded the threshold) and enable the dragging iff this flag is true. With this change: - if preventStealing is true (and so keepMouseGrab() and d->stealMouse) the additional d->overThresHold prevent the start of dragging. At the same time the last if (!keepMouseGrab()) cannot be executed since keepMouseGrab is true and we still check for the threshold being exceeded. - if preventStealing is false, we still check for exceeding the threshold and if this happen we enter in the last "if" since !keepMousegrab() && d->overThreshold is true taking the mouseGrab as without this patch Task-number: QTBUG-52534 Change-Id: I2b14d3048b6f8223c90ce5e2fd26e7ca706cb56a Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | MouseArea: add source property to mouse eventShawn Rutledge2016-03-111-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It comes from the source() of the QMouseEvent which triggered it. This makes it possible to distinguish real mouse events from those that are synthesized from touch or tablet. And for this we need to import QtQuick 2.7 [ChangeLog][QtQuick][MouseArea] Added mouse.source property to enable distinguishing genuine mouse events from those that are synthesized from touch or tablet events. Change-Id: I568964f63981703bd23e05daac5288518f09d837 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-221-0/+13
|\| | | | | | | Change-Id: I4af0bf8ec1569097d97f8ce0bb8bf1a0e4a989ec
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-0/+13
| |\ | | | | | | | | | Change-Id: Ieb48911638b5c1acdfd4dee8aa19dca9be99a1f6
| | * MouseArea: fixed a crash in propagate()Liang Qi2015-11-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Should not propagate without window. Task-number: QTBUG-49100 Change-Id: Ieda3a8357283f8d07d4ffc0cc62c4e15645d7e5a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | Updated license headersJani Heikkinen2016-01-201-17/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | 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>
* / tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-11/+11
|/ | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | 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>
* MouseArea: Fix cancelling the double click when the windows loses focusOlivier Goffart2014-09-031-6/+47
| | | | | | | | | | Without this, the next click is not received after the windows loses focus while we double clicked but not released the mouse. This may happen if the onDoubleClicked opens a new window Change-Id: I86742de2bb1ea4c9657b9d5e90472d093293177d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - 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>
* Add containsPress property to MouseAreaMartin Jones2014-07-161-0/+65
| | | | | | | | | | | | | | | | It is very common to use pressed and containsMouse properties together to highlight a pressed item, e.g. property bool highlighted: pressed && containsMouse The containsPress property allows simplification and optimization of user code. [ChangeLog][QtQuick] Add containsPress property to MouseArea Task-number: QTBUG-40130 Change-Id: Ie286d431154eb37a99e57e4cf881d68d7cbbe31d Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Introduce MouseArea.drag.smoothedKevin Funk2014-05-141-0/+45
| | | | | | | | | | | [ChangeLog][QtQuick] Added property MouseArea.drag.smoothed for toggling whether the drag target is moved to the current mouse position after a drag operation has started. Task-number: QTBUG-38539 Change-Id: I989b51bc83fc24c64b84ac8e9a50b352e674e8f8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Revert "Skip unstable test"Liang Qi2014-02-031-1/+0
| | | | | | | | | | This reverts commit 8e0c5b59f57b51a0dc80d3d8274202776c6e03df. This test doesn't fail any more. Task-number: QTBUG-23976 Change-Id: I77704e7811c4c335cb5836ba7645a8804c13e12d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* When the MouseArea loses grab, an active drag should be cancelled.Robin Burchell2013-11-301-0/+52
| | | | | Change-Id: Icc784dd3265c211d9b077b692464591a41976354 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Don't propagate mouse events to disabled MouseAreasAlan Alpert2013-11-051-0/+23
| | | | | | | | Task-number: QTBUG-34368 Change-Id: I28d4f57e51300f12a7bab5d215933762102f3916 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>