aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
Commit message (Collapse)AuthorAgeFilesLines
...
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-021-1/+1
| | | | | | | | All QFontDatabase APIs are static, use them accordingly. Task-number: QTBUG-88114 Change-Id: Iaa6be07e47adcdb5115e475cc5228f403e9a2b27 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update tests to use new metaType systemDavid Skoland2020-11-025-7/+7
| | | | | | | | Change from the QVariant enum to the QMetaType enum and prefer typeId over userType where possible Change-Id: Ic89c55978d46cc23d23b8e9c82c475c0c220fae3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_QQuickMultiPointTouchArea::inMouseAreaShawn Rutledge2020-10-291-2/+0
| | | | | | Task-number: QTBUG-86729 Change-Id: I4cf59a1afacd56be114393e70f132d25a8f084eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_qquickitem::touchEventAcceptIgnoreShawn Rutledge2020-10-292-70/+24
| | | | | | | | | | | | | | This test (like many) is older than the setAcceptTouchEvents() function added in 1457df74f4c1d770e1e820de8cd082be1bd2489e. Now there are 3 cases: if we don't setAcceptTouchEvents(true), the item doesn't get any touch events; but if it does, it can accept or reject the individual events. For some reason the touch events were tediously created and sent before, but using QTest::touchEvent() simplifies it a lot. Task-number: QTBUG-86729 Change-Id: I2dd12af8c356c5455bd37d691fc24f3e1d9c107b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't send an item a mouse release with a button that it doesn't acceptShawn Rutledge2020-10-291-2/+0
| | | | | | | | | | | | | In tst_qquickitem::ignoreButtonPressNotInAcceptedMouseButtons(), when the right mouse button release occurs, the item has a grab, but it's not interested in the right button, only the left. But of course we still want to deliver mouse drags, so if the button is NoButton and the item is the grabber, it gets the event. Task-number: QTBUG-31861 Task-number: QTBUG-86729 Change-Id: I952acc721a5f80a7fc5619c5fea640dae805e9c8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix and improve parts of tst_qquickitemShawn Rutledge2020-10-292-80/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reusable TestItem: - initialize variables where declared - don't accept touch events by default; the only test that uses touch is touchEventAcceptIgnore(), so it can do that for itself mouseGrab(): - don't skip it on Windows - construct items with explicit parents; we don't need QScopedPointer because the window is stack-allocated, and children get deleted - check grabber with QPointingDevicePrivate::firstPointExclusiveGrabber() rather than QQuickWindow::mouseGrabberItem() - remove qWait()s, use QTRY_COMPARE - QTRY_COMPARE hopefully shows enough info so we don't need to use QVERIFY2 with a custom message to compare equality - changing the grabber at a time when no event is being delivered is no longer supported (this was the part that needed blacklisting) - add a new stanza to test that mouse events don't propagate from the top item to the one underneath, if it neither accepts nor ignores it explicitly (analogous to mousePropagationToParent() but checking a sibling underneath, rather than a parent) hoverEvent(): - not sure why the comment from ede31210aafbfb961059a6e0934d6e6a79e06447 says QTest::mouseMove() didn't work, but nowadays it does Task-number: QTBUG-87947 Task-number: QTBUG-86729 Change-Id: I2627555e8bc0e4c3782239cb8ebde75395fea908 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add tst_qquickitem::mousePropagationToParent() testShawn Rutledge2020-10-291-5/+59
| | | | | | | | | Verify that events are pre-accepted, and that when an item doesn't touch the accepted state at all, it doesn't propagate to a parent item. Task-number: QTBUG-87947 Change-Id: I162cc860424aa736cc3650fd0daa2e7bc705fc70 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Improve tst_TouchMouse::pinchOnFlickableShawn Rutledge2020-10-281-40/+23
| | | | | | | | | | | - use for loops instead of tedious repetition - compare instead of verify to check negative bools - QTRY_COMPARE instead of qWait - move touchpoints by drag threshold to ensure repeatability: both flickable and pincharea wait for the threshold to start reacting Change-Id: I071fc05280e2156223af57d97079516987a744ab Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make touchmouse pinch test qml manually testable and visually sensibleShawn Rutledge2020-10-282-14/+21
| | | | | | | | | | | - There was no reason to import Qt.test - Make colors less garish - Explain what the rectangle is for (it's not the only place for pinching, and the appearance is a bit misleading) - Show click feedback at the position instead of toggling colors Change-Id: Id75a52e46a5e8611a57eb69a037cced9a9f7d54f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tst_PointerHandlers::touchReleaseOutsideShawn Rutledge2020-10-272-3/+3
| | | | | | | | | In Qt 6, setAcceptTouchEvents(true) must be done explicitly for an item to receive touch events. Task-number: QTBUG-86729 Change-Id: Ib18db22b6a7213dfcfdf091d554ef60fbede6111 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_PointerHandlers::mouseEventDeliveryShawn Rutledge2020-10-272-9/+17
| | | | | | | | PointerHandlers see more events now. Task-number: QTBUG-86729 Change-Id: I4dbddc8b54292450cf5ffb77489178a8a824b90d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_PointerHandlers::touchEventDeliveryShawn Rutledge2020-10-272-20/+34
| | | | | | Task-number: QTBUG-86729 Change-Id: I47a0a4aad7cff956b2ebd450870d625f817690d4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tst_MouseAreaInterop::dragHandlerInSiblingStealing…ViaTouch()Shawn Rutledge2020-10-272-7/+8
| | | | | | | | | | | Check the actual touchpoint's grabbers instead of the synth-mouse. Anyway it looked odd to press touchPoint ID 1 and then look for the persistent point with ID 0 on the primary pointing device, which isn't always a mouse. Task-number: QTBUG-86729 Change-Id: I0a27fdd931059b30b0b5a54328bbef6254d26e04 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist qmltestrunner::touch::test_secondWindow and othersShawn Rutledge2020-10-263-0/+14
| | | | | | Task-number: QTBUG-86729 Change-Id: Ia4db0a98a4977cb89799c5749983a370d35317a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix some compiler warnings in testsVolker Hilsheimer2020-10-262-17/+9
| | | | | | | | | | | Use char16_t instead of quint16 for arrays of 16bit strings. Use QKeyCombination API. As a drive-by, remove superfluous 0 from characters specified in hexadecimal. Change-Id: Ic52b1fdceaf3348a9b81c40814031e9c2e557dd9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compiler warning: mark overrides as such, remove virtualVolker Hilsheimer2020-10-231-6/+6
| | | | | | Pick-to: 5.15 Change-Id: I77bd88eb0f277c139fd296c1dafa8b09517a3064 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* TableView: ensure we rebuild the sync view, even when flicking on a sync ↵Richard Moe Gustavsen2020-10-231-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | view child When two table views are connect through the syncView property, both views will flick when you flick on either of them. This also means that if you fast-flick more than a page on the sync view child, the sync view needs to rebuild, like if you did the fast-flick directly on the sync view. Because we updated the sync view's viewportRect too soon while fast-flicking on the the sync child, we didn't detect that it was a fast-flick, and that a rebuild was needed. The result is that you could sometimes end up with the views getting out-of-sync. This patch will allow TableView to only move the viewport without updating the internal viewportRect while flicking. The viewportRect will instead be sync-ed at a later point, like we do when you flick on the sync view directly. This will ensure that we rebuild if needed, also while fast-flicking on the child view. Task-number: QTBUG-87821 Pick-to: 5.15 Change-Id: Ifc74473eb43406acaa8e24880066fb4ca89d3a4e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make tst_QQuickMultiPointTouchArea::inFlickable() more debuggableShawn Rutledge2020-10-222-102/+97
| | | | | | | | | | | | | | It was all-white despite having two items that react to events, which makes it hard to see what's failing when it fails. Use loops rather than tedious repetitive hard-coded moves to improve readability. "ensure that mouse events do not fall through to the Flickable" must include having the MPTA "eat" the mouse press. Change-Id: Ibca14709afbd561f03a62d74d10e6cae94ab302e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compile warnings from testsVolker Hilsheimer2020-10-223-7/+9
| | | | | | | | | | | Use streaming operators for debug/warnings to avoid qsizehint/int conflicts. Don't ignore return values from [[no_discard]] functions. Don't copy elements from containers that return references. Remove unused variables. Change-Id: I7a0bef94a5e828bd8facee0c625ec48c3d1f1bdb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update and activate tst_animatorsShawn Rutledge2020-10-226-20/+63
| | | | | | | | | | | | | Amends a0f8be4021caa9bb5055923f0eea3bee0e345235; it's not clear if there's any reason we haven't been running this test all these years. But we need to use testFileUrl() for loading QML files, and some additional updates make it more like the other tests. Regenerated CMakeLists.txt from the .pro files: python3 ~/dev/qt6/qtbase/util/cmake/pro2cmake.py *.pro Pick-to: 5.15 Change-Id: I3ddcc993c4536c2d4d751a37c0425943c7d86766 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* TableView: ensure we update content size upon model changesRichard Moe Gustavsen2020-10-211-10/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tables of non-trivial sizes, we usually don't know what the content size will be unless we load all rows and columns, which we simply cannot do. Because of this, we have up till now chosen a strategy where we normally just calculate a predicted content size up-front, when we table is built, and afterwards just stick to that prediction. This strategy works for big tables that fills more than one size of the viewport, and if the number of rows and column in the model stays around the same. But for tables that start off smaller than the viewport, and later expands to grow out of it, it simply fails. And the failure is such that the tableview can get stuck, with no way way for the user to flick around to see the rest of the contents. An example is TreeView that might only show the root node at start-up, but as you start to expand the tree, it will quickly add more rows than what fits inside the viewport. And in that case, the contentHeight will be totally off, and in turn, make the scrollbar be based on wrong values, and sometimes not work at all (e.g if it has the flag Flickable::StopAtBounds). This patch will change the implementation so that we recalculate the content size whenever it should logially change. That is, if e.g the model add or remove rows and columns, or if you change spacing. This still doesn't mean that contentWidth/Height reports the correct size of the table, but at least it will be a better guestimate for smaller tables, and at the same time, work together with Flickable and ScrollBars. Pick-to: 5.15 Fixes: QTBUG-87680 Change-Id: Ie2d2e7c1f1519dc7a5d5269a6d25e34cf441b3fe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove some compiler warningsLars Knoll2020-10-211-3/+3
| | | | | | | Don't cast a QKeyCombination to int. Change-Id: If84e2fde9ea83bedd1eb8a8dbbcb050276a333cd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do grabs out of orderLaszlo Agocs2020-10-191-0/+28
| | | | | | | | | | | | | ...while extending the autotest to cover more complicated cases, such as grabbing again after show-hide and doing show-grab-hide-grab-show-grab. In fact some of these cases have not been working in Qt 5. Now the basic render loop is fixed up to support the all the combinations threaded does. Task-number: QTBUG-87399 Change-Id: Id01995bc3a2660b16cfb2f8bedc84becea0be1bb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* tests: Port qquickitemlayer and remove direct GL checksLaszlo Agocs2020-10-1625-166/+132
| | | | | Change-Id: I7362ae0dcbc67005c09df5c5c704912d10a74827 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QQuickShaderEffect: fix crash when hiding parentMitch Curtis2020-10-156-0/+164
| | | | | | | | | | | | It's possible for itemChange to be called during destruction when deleting the QQuickShaderEffectImpl. We nullify m_impl before deleting it via another pointer to it, so we must check that it's not null before trying to use it. Pick-to: 5.15 Fixes: QTBUG-86402 Change-Id: If4955445f7cc0d1f376bc9b86b95e1cca4d88ede Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Speed up tst_qquickflickableShawn Rutledge2020-10-145-3/+51
| | | | | | | Speed up animations that the test spends too much time waiting to complete. Change-Id: I7941660f3c3a89798c5cdd0eee8018a44fb89a0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix alwaysRunToEnd==true prevented complex Anim from stoppingPiotr Mikolajczyk2020-10-133-0/+163
| | | | | | | | | | AnimatorProxyJob would not forward loopCount to the controlled job causing the sequential or parallel animation to go infinitely after attempt to stop Task-number: QTBUG-82890 Pick-to: 5.15 Change-Id: I6a1ca787f06789064e05407bbe9ae5e5861f24d5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQuickTextEdit: ensure we update document width when padding has changedRichard Moe Gustavsen2020-10-082-0/+33
| | | | | | | | | | | | | | | We use an if-test to check if the document width has changed before we set the new value. The problem is that the value we test against is different than the value we set. The result is that we can sometimes skip setting a new width on the document, even if padding has changed. This patch ensures that we use the same width for both testing and setting. Pick-to: 5.15 Change-Id: Ia8391999e8cc2b5be72fe525d396bf8c17ba0fa2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickListView: prevent mouse delivery in floating header or footerShawn Rutledge2020-10-072-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | Earlier we reimplemented the contains() method of ListView to prevent dragging in an Overlay or Pullback header or footer. But in QQuickWindow (QQuickWindowPrivate::pointerTargets()), an early check prevents delivery of pointer events to an item that is clipped and for which contains() returns false, and also to its children. In that case, the header or footer no longer responds to a mouse event even if you put a MouseArea in it. Reverts 6ad3445f1e159d9beea936b66d267dcaacdc5d6c; reimplemented using similar logic in a new QQuickListViewPrivate::wantsPointerEvent() method, overriding QQuickFlickablePrivate::wantsPointerEvent(), which is now checked in event-handling code in addition to checking the interactive flag. Done-with: Wang Chuan <ouchuanm@outlook.com> Pick-to: 5.15 Task-number: QTBUG-74046 Fixes: QTBUG-85302 Change-Id: I9474f035d26b74ee36c0ac19e45a77de2e694bf1 Reviewed-by: Wang Chuan <ouchuanm@outlook.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-0686-229/+229
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Un-blacklist Quick tests that are passingShawn Rutledge2020-10-067-33/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: I35dc7ac91d2507a229dc1dde19f380e7111a4757 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove obsolete autotest caseLaszlo Agocs2020-10-021-28/+0
| | | | | | | | | ...that would fail (threaded render loop only) - if the CI would run these tests, that is. What this case relies on went away from the threaded loop weeks ago Change-Id: Ia6087241d497e945a10a8f22d73468e557f251a7 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* skip tst_QQuickMouseArea::nestedEventDelivery on macOSShawn Rutledge2020-10-021-0/+3
| | | | | | | | | It has blocked integrating anything in CI because of crashing, so blacklisting is not enough. Does not crash locally for me on macOS 10.15 Task-number: QTBUG-86729 Change-Id: Iddae9edb09fd7b7fdadd122779832c80d0376b2d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist a few more on macOSShawn Rutledge2020-09-264-0/+10
| | | | | | Task-number: QTBUG-86729 Change-Id: I49fb86e867afeee2f0567dc3498598b249ae5e08 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Handle ungrab and grab-cancel consistently; inform handlersShawn Rutledge2020-09-268-42/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call onGrabChanged on Pointer Handlers during grab transitions: this was missing in a97759a336c597327cb82eebc9f45c793aec32c9. Flickable needs to receive an ungrab by child-event-filtering, in order to set its pressed state back to false (as in the cancelOnHide autotest). This is best done as a result of the QPointingDevice::grabChanged signal, while trying to send the ungrab to the item that was the grabber, rather than as a special case. Thus, QQuickWindowPrivate::onGrabChanged (the handler for the QPointingDevice::grabChanged signal) is now the only place from which we call QQuickItem::mouseUngrabEvent() and touchUngrabEvent(). But the result is that they are called in more cases than before, so some tests need adjustment. touchUngrabEvent() is not sent unless the event is available and we can verify that all points have been released. This is important for MultiPointTouchArea: it will react by ending interaction with all points at once. Another thing that's important to MPTA and multi-touch handlers is that QQuickWindowPrivate::deliverPointerEvent() must not clear grabbers of points that are not yet released, in the case that only some points are. QQuickWindowPrivate::removeGrabber() now calls QPointingDevicePrivate::removeGrabber() with its optional cancel argument, so that it will emit either a cancel or an ungrab transition. That's only relevant for Pointer Handlers, whereas QQuickItem mouseUngrabEvent and touchUngrabEvent don't make a distinction. Task-number: QTBUG-86729 Change-Id: Idf03aef2e2182398e0fc4a606c0ddbb2aaed5681 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist various failing testsShawn Rutledge2020-09-255-0/+21
| | | | | | | | | | | | tst_qqflickable::nestedStopAtBounds, nestedSliderUsingTouch tst_QQuickMouseArea::preventStealing, nestedFlickableStopAtBounds tst_QQuickMultiPointTouchArea::inFlickable2, inFlickableWithPressDelay tst_QQuickPathView::nestedinFlickable, touchButtonOnFlickable, touchGrabCausesMouseUngrab tst_qqmlpropertycache::derivedGadgetMethod Task-number: QTBUG-86729 Change-Id: Ie11a50c25f90fde2636b05a72f51640643b33dec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist tests flickable.nestedPressDelay, gridview.snapOneRowShawn Rutledge2020-09-242-0/+4
| | | | | | Task-number: QTBUG-86729 Change-Id: I061147b99c957a9b0d15b2f3305e26c9e2a99989 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Stabilize tst_QQuickListView::parentBindingShawn Rutledge2020-09-242-2/+8
| | | | | | | | | | Some platforms aren't registering their mouse devices yet, and we don't want false failures in CI because of that, so just register a mouse, even if it ends up being an extra one a lot of times. Task-number: QTBUG-86729 Change-Id: Ia3a91e3d1e4fb8df90352555c9a7ec6ea18bf6fe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get rid of QMutableEventPoint::stationaryWithModifiedPropertyShawn Rutledge2020-09-241-6/+7
| | | | | | | | | | | | Omitting stationary points from touch events is such a marginal optimization that this code probably isn't worth maintaining. It wasn't implemented correctly this time either, according to the tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure() test. Task-number: QTBUG-77142 Change-Id: I1ccc8ffe0451d6417add2b03c063ac1aebe36e8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist tst_qquickwindow::cleanupGrabsOnReleaseShawn Rutledge2020-09-241-0/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: I9d592ae48d26851938d57d52620af12c2086054a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist maiop::dragHandlerInSiblingStealingGrabFromMouseAreaViaTouchShawn Rutledge2020-09-241-0/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: Ib2585663d8cc213ccd14d1fa5d3bd854062b09c9 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Allow proper registration of value typesUlf Hermann2020-09-231-7/+7
| | | | | | | | | | | | | | | | | | | | You can now have an extension object on a value type that offers additional properties. This is how we model the QtQuick value types. It allows us to retrieve the extension's metaobject without using the virtual functions in the value type provider. As before, this mechanism is still rather dangerous and not fit for public consumption. It relies on the extension object having exactly the same layout as the original value type, and it hides any properties the original value type might expose. Furthermore we enforce now that gadgets should have lowercase names. The ones that didn't before are split up into an anonymous value type and a namespace that contains all the addressable bits. Task-number: QTBUG-82443 Change-Id: Ic93d6764538d6ccc0774b3c5648eee08ba0939c0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Prevent crash when destroying asynchronous LoaderJoni Poikelin2020-09-232-0/+68
| | | | | | | Fixes: QTBUG-86255 Pick-to: 5.15 Change-Id: I30488b64d910a1409a43e2e98ee7ab084aec33d2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Blacklist tests due to QPointerEvent changesShawn Rutledge2020-09-1815-0/+89
| | | | | | | | | | | | | | | | qtbase/2692237bb1b0c0f50b7cc5d920eb8ab065063d47 and the associated Qt Quick change to do direct delivery of QPointerEvents seem to have broken a number of tests as they are currently written. It looks bad; however I spent a lot of time already on some older "basic" tests like tst_qquickwindow, touchmouse, tst_qquickflickable etc. and found a lot of things to fix while doing that; so at least those aren't broken now. Troubleshooting each test takes time. Hopefully it will turn out that many of these failures are related (there seems to be something in common about handlers and items stealing touch grabs from each other). Task-number: QTBUG-86729 Change-Id: I14acf57fc83fa961a25f91108dcd4aea42b54435 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove QQuickPointerEvent etc.; deliver QPointerEvents directlyShawn Rutledge2020-09-1810-218/+234
| | | | | | | | | | | | | | | | | | | | | | | QEventPoint does not have an accessor to get the QPointerEvent that it came from, because that's inconsistent with the idea that QPointerEvent instances are temporary, stack-allocated and movable (the pointer would often be wrong or null, therefore could not be relied upon). So most functions that worked directly with QQuickEventPoint before (which fortunately are still private API) now need to receive the QPointerEvent too, which we choose to pass by pointer. QEventPoint is always passed by reference (const where possible) to be consistent with functions in QPointerEvent that take QEventPoint by reference. QEventPoint::velocity() should be always in scene coordinates now, which saves us the trouble of transforming it to each item's coordinate system during delivery, but means that it will need to be done in handlers or applications sometimes. If we were going to transform it, it would be important to also store the sceneVelocity separately in QEventPoint so that the transformation could be done repeatedly for different items. Task-number: QTBUG-72173 Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix additional warnings from usage of deprecated APIsVolker Hilsheimer2020-09-161-2/+2
| | | | | | | | | | Replace more QLibaryInfo::location with QLibraryInfo::path Replace old event accessors APIs, including relevant comments. Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWindow: Consider z-order of children when delivering pointer eventsYoungSun Park2020-09-154-0/+164
| | | | | | | | | | | | | When creating a target item list for handling pointer events, put children after the parent item if they have negative z-order value. This fixes an issue where an item does not receive a pointer event if there is a child item that accepts the event even when that child item is shown under the parent item as per the stacking order. Fixes: QTBUG-83114 Pick-to: 5.15 Change-Id: I711faa22516f5c2396b1138dc507bcaa4ba22241 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist a test that started failing after even changes in qtbaseLars Knoll2020-09-151-0/+1
| | | | | | | | | | This test probably started failing after the pointer event refactoring in qtbase. Blacklist for now, so we can update dependencies in declarative. Change-Id: I72634ed67efe7d23f64bf0c96889129081f4a016 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Skip tst_TouchMouse::buttonOnDelayedPressFlickable on macOSUlf Hermann2020-09-151-0/+4
| | | | | Change-Id: I1b1b5d00ae8bef77ad63f8df5ec893b045e21923 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickCanvas: Skip failing test for nowFabian Kosmale2020-08-281-0/+2
| | | | | | | | | | font::toString now outputs more information, so the test would need to be adjusted. However,we priorize geting the dependency update in over fixing the test for now. Task-number: QTBUG-86304 Change-Id: I44182b6115752a4cfb177e07b862f9e018613edf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>