aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add MouseArea autotest with second touchpoint while first is heldShawn Rutledge2022-05-261-0/+20
| | | | | | | | | | | | | | | - Touch first finger - Touch and release second finger - Release first finger QQuickMouseArea::pressed() must be emitted only once; QQuickMouseArea::released() must be emitted at the end. Task-number: QTBUG-103766 Change-Id: I849bbbad67c4739bea0a241b396bf4cbbebdd2e0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5680f42a979778455508b4bd076457a353becda5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix index handling on insert in QQmlDelegateModelUlf Hermann2022-05-233-0/+153
| | | | | | | | | | | | | QQmlListCompositor can manipulate the "before" index when inserting. In particular it can extend an existing group. QQmlDelegateModel's cache, however, always wants the original index. Fixes: QTBUG-100161 Fixes: QTBUG-103203 Change-Id: I35c0a14ae45c9f66fdd079894dd0de2f80e2c781 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit e8ba9a3caa362f05657c4cb83893fe429ebaf4ab) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Skip tst_v4misc::nestingDepth because it crashes on AndroidAndreas Buhr2022-05-231-0/+4
| | | | | | | Task-number: QTBUG-103743 Change-Id: I5e3c400f911dce6e92a59d6f6c12c394a83fb51d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Skip crashing test in tst_qmlcppcodegen on AndroidAndreas Buhr2022-05-201-0/+4
| | | | | | | | | | | | tst_QmlCppCodegen::scopeObjectDestruction() crashes on Android. Skip this test for now. Task-number: QTBUG-103044 Task-number: QTBUG-101865 Change-Id: I1d6291decf946b954bffc2378255c209126106fd Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit bdbab58de7f905a3858811905f4ac94595ddbdeb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_qquickimageprovider tests on AndroidAndreas Buhr2022-05-201-0/+21
| | | | | | | | | | | | tst_qquickimageprovider tests fail on Android. Blacklist them for now. Task-number: QTBUG-103047 Task-number: QTBUG-101865 Change-Id: I96ad263debc04dc899949853496ca772a93f8fea Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit d0d25daf17013305d98594d5bd00cb1f6dda72f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_QQuickDropArea::signalOrder() on AndroidAndreas Buhr2022-05-201-0/+3
| | | | | | | | | Task-number: QTBUG-103083 Task-number: QTBUG-101865 Change-Id: I148fd0452a7a326dc2bf47c2134c68a90f8c3517 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 1c2ffc409a29ee69960e95ac61188e6fbc345e41) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tests in tst_qquickdrag on AndroidAndreas Buhr2022-05-201-0/+25
| | | | | | | | | Task-number: QTBUG-103082 Task-number: QTBUG-101865 Change-Id: I2326a4019de2a8e2116053c34a49e3b57a41c75d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit c9df27ca070e8ff976338a92484a27d676279840) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquickshape on AndroidAndreas Buhr2022-05-201-0/+19
| | | | | | | | | Task-number: QTBUG-103094 Task-number: QTBUG-101865 Change-Id: Ifa87dc5965003325adc7463fd6ff88a872e2d01d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 45de69e7f831a134f8bbb2f1c1ec99714d08ca1c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_qquickfocusscope::canvasFocus() on AndroidAndreas Buhr2022-05-201-0/+3
| | | | | | | | | Task-number: QTBUG-103086 Task-number: QTBUG-101865 Change-Id: Ifd1fc606983fdeaca4f5611743c4dbc6fba5a873 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 01eb63b803b21fe70a1bc604160d3f2c4f514127) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquickborderimageAndreas Buhr2022-05-201-0/+7
| | | | | | | | | Task-number: QTBUG-103077 Task-number: QTBUG-101865 Change-Id: I52e961ab42d637ae993dfc117d1a544ec522fb28 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit be1f11cb902de2313428a5b9179c824649ed1f24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip tst_quick_examples tests on AndroidAndreas Buhr2022-05-201-0/+6
| | | | | | | | | | | | tst_quick_examples tests needs major adaptions for Android. Skip them for now. Task-number: QTBUG-102858 Task-number: QTBUG-101865 Change-Id: I7725142d1c18e82e3c06e51fd724f1370fb48b09 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 431fa61b33a249c9bda98920af8efaf2f7f36474) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* MouseArea: don't override preventStealing on mouse releaseShawn Rutledge2022-05-202-0/+62
| | | | | | | | | | | | | In setPreventStealing() we call setKeepMouseGrab(); so it does not make sense to override setKeepMouseGrab() in other places without even checking the state of the preventStealing property. Fixes: QTBUG-103522 Change-Id: Ib4a2b01b814835715642aec83fac0a84debe2461 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d92f1dfe05370c4a2ca7d86810e00b7466f454ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_qquickanimatedimage::mirror_* on AndroidAndreas Buhr2022-05-191-0/+5
| | | | | | | | | Task-number: QTBUG-103076 Task-number: QTBUG-101865 Change-Id: I9d663c2deaf187a8431389aa52b1bc7db1cea618 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 344b186b8df651b70ea0a28ab20f82f3e401116a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_TapHandler::gesturePolicyDragWithinBounds on AndroidAndreas Buhr2022-05-191-0/+4
| | | | | | | | | Task-number: QTBUG-103072 Task-number: QTBUG-101865 Change-Id: Ia1a37fc3819c86efbf99a0fd151bc307876daedf Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit e55b739f11c20e032c2b2466522611407ee9f49d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing and skip crashing tests in tst_qquickwindowAndreas Buhr2022-05-192-0/+24
| | | | | | | | | Task-number: QTBUG-103078 Task-number: QTBUG-101865 Change-Id: Iebfab29e96ad1786093a52810d14a4d4c81b3af9 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit efd97e5f955df1356ffe16b21983ec19fea894be) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_QQuickPinchHandler::scaleNativeGesture on AndroidAndreas Buhr2022-05-191-0/+3
| | | | | | | | | Task-number: QTBUG-103066 Task-number: QTBUG-101865 Change-Id: Ia6e517c71b1f46a6dfc1a5b423cb019b5ce91ddd Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 19cae6f54d76ae4019afce1cc52c63941972a065) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_PointHandler::tabletStylus() on AndroidAndreas Buhr2022-05-191-0/+1
| | | | | | | | | Task-number: QTBUG-103068 Task-number: QTBUG-101865 Change-Id: I27288bd8122278c5e9b483310ef10c4aaefcf2a7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit aec8ff40e94cbaeac8d856f9819dd356d00c4ec6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist tst_QQuickListView::contentHeightWithDelayRemove() on AndroidAndreas Buhr2022-05-191-0/+3
| | | | | | | | Task-number: QTBUG-103089 Task-number: QTBUG-101865 Change-Id: I2eecf525e4d354d56765361c3b6fdf6b28716e94 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 8c3b77da082b11d4b5839276d655e7f2540f1c32)
* Skip crashing test in tst_qquicktext on AndroidAndreas Buhr2022-05-191-0/+4
| | | | | | | | | Task-number: QTBUG-103096 Task-number: QTBUG-101865 Change-Id: I6960a17eda45055733a9f04cc6897bf745a4b2f2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 47eeefd2413d0f7baf0e1c83b651ad239ce7c8d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquickmouseareaAndreas Buhr2022-05-191-0/+7
| | | | | | | | Task-number: QTBUG-103092 Task-number: QTBUG-101865 Change-Id: I5ee3092bbb74bd6779821ba881a6062126bfd6d4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 0452681b6e8d02bd39b054a5540ffea583c0a7ff)
* Include qml test data file in tst_qquickimageprovider for dependenciesAndreas Buhr2022-05-193-2/+26
| | | | | | | | | | | | | | When building tst_qquickimageprovider for Android, it did not contain all of its dependencies, because qml scripts are defined in strings and are thus invisible to the build system. This patch creates one qml file which is enough for the build system to pick up the dependencies. Task-number: QTBUG-103047 Task-number: QTBUG-101865 Change-Id: I2c08f56995b43d1861fbf6b9359b150318a7c0f5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 9ab67f0ff03757d55e943a312ed1abd27b217b68)
* Blacklist failing tests in tst_qquicktextedit on AndroidAndreas Buhr2022-05-191-0/+10
| | | | | | | | Task-number: QTBUG-103098 Task-number: QTBUG-101865 Change-Id: I5edb568d2fda00dbe62c86fe04b5c4eebc75871f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit e2015e7ad38cfaca0d0eda32f4d902d9205f21de)
* Blacklist tests which fail on OpenGL context creation on AndroidAndreas Buhr2022-05-194-0/+19
| | | | | | | | Task-number: QTBUG-100991 Task-number: QTBUG-101865 Change-Id: If3fab4db4a4b21ca0fb1c726d25ab1f876de681b Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit eb5ff13248bc08c0f44bc9e6fe4fc9dd50197dd0)
* Blacklist tst_qquickdeliveryagent::passiveGrabberOrder() on AndroidAndreas Buhr2022-05-191-0/+3
| | | | | | | | | Task-number: QTBUG-103080 Task-number: QTBUG-101865 Change-Id: Ic0f687ac59af4f2cc80d3514df7bbcad53367fa2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7e7cfdec8e885c3b608a22a2d77321cafa7b1eca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove tst_qquickcanvasitem on AndroidAndreas Buhr2022-05-181-1/+3
| | | | | | | | | | | Test in tst_qquickcanvasitem keep failing randomly. This patch disables it completely for Android. Task-number: QTBUG-103099 Task-number: QTBUG-101865 Change-Id: Icd10d9eb4f45987899bc0cac3163301f43a6d024 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit efad05da66b8dc9cc04528c83d1a5a6de47407a3)
* Quick Popup: ignore unhandled eventsVolker Hilsheimer2022-05-181-0/+76
| | | | | | | | | | | | | | | | | | | | | | | QQuickPopups event handling code deals with two concepts: the handling of events by the popup (accepting the event and becoming the grabber for the relevant device in case of press events), and the blocking of events to other items. For a plain popup that's ok, but events that aren't blocked by the popup must be ignored by it to that they propagate correctly. QQuickDrawer, which subclasses QQuickPopup and overrides the blocking logik (via QQuickDrawerPrivate::blockInput), conflates those two concepts, which is not ok as QQuickDrawer is interactive and may accept an event even if the event is not modally blocked. Press events that go to the content item of the drawer are never blocked, but must get accepted so that the drawer receives the following mouse moves. Fixes: QTBUG-93649 Change-Id: I254ccd843dc0250d334abb9b1062e7feffb86beb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit f0b278c4d0c4b50fc6947b4b1beb07ae172546c6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquicklayouts on AndroidAndreas Buhr2022-05-181-0/+9
| | | | | | | | Task-number: QTBUG-103060 Task-number: QTBUG-101865 Change-Id: Ib8da14710a9bc7caced99e069f752b2108268da2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 12ddc8bd6d84143868bb79b0aa53a9f8ad122667)
* Blacklist tst_QQuickListView::QTBUG_48044_current...() on AndroidAndreas Buhr2022-05-181-0/+4
| | | | | | | | | Task-number: QTBUG-103089 Task-number: QTBUG-101865 Change-Id: I0013e25de4842b320bbb8c73887c9fae293cd8b8 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit ada0e5eef6d73c42d289221c6fcae6677566d86a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquickdraghandler on AndroidAndreas Buhr2022-05-181-0/+6
| | | | | | | | Task-number: QTBUG-103064 Task-number: QTBUG-101865 Change-Id: Ie3b8ae1311c91a69cbe2b1a203a9a4c12ee720d4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit dad8bf5167cc112201611092b246bcc0f90387fd)
* tst_qqmlqt: fix TimeZoneSwitch logicIvan Solovev2022-05-172-8/+5
| | | | | | | | | | | | | | | | | The TimeZoneSwitch class was setting the doChangeZone flag incorrectly, so it was actually trying to change the zone only for "localtime". This patch fixes the issue. With this fix applied, the test started failing on some OS that fail to change local timezone, so skip such input data for these configurations. Fixes: QTBUG-100014 Change-Id: If39a15fe1008211a940174fdc3aa5209df34c115 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit c9013be2d9dcfe710932ec2f2c0e765a893e68f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquicktextinput on AndroidAndreas Buhr2022-05-171-0/+5
| | | | | | | | Task-number: QTBUG-103256 Task-number: QTBUG-101865 Change-Id: Iaac2361ca9fa125c96c4aa7db72f19b663f66c94 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 4935f39ebdc1037e9c5a741067bf6031a84950b2)
* Blacklist tst_DragHandler::touchDragMulti on AndroidAndreas Buhr2022-05-171-0/+5
| | | | | | | | Task-number: QTBUG-103064 Task-number: QTBUG-101865 Change-Id: I6eb134fad9f17b897fc037f3e98b770ec181bb02 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 4528384c81f0fb0a18c72ca4a50eea92a6238e6d)
* Blacklist failing tests in tst_qquickanimatedsprite on AndroidAndreas Buhr2022-05-171-0/+4
| | | | | | | | | Task-number: QTBUG-103260 Task-number: QTBUG-101865 Change-Id: I5faeb263af29dd420ba01f2e5c6647ba15619eb7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit d5b0599466a185bcd7456798dc79ac99682d2474) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist failing tests in tst_qquickrendercontrol on AndroidAndreas Buhr2022-05-171-0/+3
| | | | | | | | | Task-number: QTBUG-103258 Task-number: QTBUG-101865 Change-Id: Icef6a26334fafe48bcee84615c0d72cce909bee3 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 0e6a33e04b434cb7b91bb017a96729cdc34c7f4d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip crashing test in tst_qquickcanvasitem on AndroidAndreas Buhr2022-05-171-0/+3
| | | | | | | | | Task-number: QTBUG-103257 Task-number: QTBUG-101865 Change-Id: I9d656bf359ca5d94bb65b7477f373ad46ca3304b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4f58b7d201cadcd2d09be91e4229da66545414d3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Port QV4::CompiledData::Binding to new special integer bitfieldUlf Hermann2022-05-173-11/+11
| | | | | | | Task-number: QTBUG-99545 Change-Id: I9f8bc5fa45c61f77ee95b055a3d8de001da8f8c5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 36ebee4e69182f0e44d87691d4740b271e1dcf38)
* SwipeView: position the pages adjacent to each other initiallyShawn Rutledge2022-05-141-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | ListView only manages the positions of the visible delegates; but the children of SwipeView are instantiated at startup. When we didn't set their positions, if they are translucent, they were simply piled up on top of each other until ListView got around to positioning them during swiping. Between a055629f43cf8589ff6d69e46b2610429aaa4167 and e10de033f4c44855de7287a97e2aa651f648742e SwipeView was calling setCulled(true); we stopped doing that because of QTBUG-99547. So now it makes sense to position the delegates the same way that ListView will eventually position them... assuming there are no other special cases for custom positioning. They are still effectively "culled" by being outside the viewport, or the clip. Fixes: QTBUG-102487 Task-number: QTBUG-51078 Task-number: QTBUG-51669 Task-number: QTBUG-99547 Change-Id: I58afab55cc95a1d4a637111a9cca82e6177856ff Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 7a5bbc23150fe73f86e9eb81d252cb8ebc673784) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Generalize role selection mechanism from QQuickComboBoxUlf Hermann2022-05-122-4/+22
| | | | | | | | | | | | | | | | | | | | | We can have QQmlDelegateModel pick specific roles from model items. That can easily be done for variant maps, variant hashes, objects and gadgets. We would like to do it for anything that has a QMetaAssociation, but as we cannot get to the original type at that place, it's currently not possible. The special case about variant maps with exactly one item in variant lists is clearly insane and therefore not included in the generalization. This requires some cleanup in the QQmlGadgetPointerWrapper. Passing the wrapper itself to QMetaProperty::read() has always been a rather obscure way of reading from the gadget. Fixes: QTBUG-102983 Change-Id: I84ecef980783e7137aa4d77070ddce47b6ead260 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d0c7c7234cb7629fbe7a04944cb5191414cc72b9)
* Android: fix tst_QQuickMenuIvan Solovev2022-05-125-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several reasons for the test failures: - Difference in default behavior on Android and Desktop systems. On Android the menus are not cascading by default, so some tests failed because they were expecting cascading menus. That is fixed by explicitly specifying cascade flag in QML files. - Mouse hovering does not open/close sub-menus on Android, because Android has no cursor support. So parts of the tests that rely on this behavior are simply skipped. Same for the parts of the tests that try to explicitly set cursor position. - Some of the tests expect certain window size. On Android calling QQuickWindow::show() shows the window fullscreen, which can be larger or smaller than an expected size. As a result the tests fail because various assumptions are broken. That is fixed by using showNormal(), which shows the window with the desired size. This makes little sense in real applications, because it can result in some information being "hidden" behind the screen border, but seems to be fine for tests. - The previously skipped tst_QQuickMenu::disableWhenTriggered() is now enabled, because it does not crash and needed just some minor adjustments. Fixes: QTBUG-100256 Change-Id: I53832f52071d5c2495a97058a968775d3f89598e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit e2622964092f340dfdb95d97a40de99591520df0)
* Android: fix tst_QQuickDrawerIvan Solovev2022-05-125-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes and unblacklists several tests on Android: - tst_QQuickDrawer::reposition This test was simply unblacklisted, because it does not fail anymore. - tst_QQuickDrawer::position The problem with this test was that on Android the actual window size is different from the one defined in QML file. To show a drawer, we need a swipe gesture started directly from the edge of the window. So the fix is to calculate the edges based on screen geometry. - tst_QQuickDrawer::hover For this test the QML files needed to be adjusted. On Android the main window takes fullscreen, so Drawer's height of 400 was not enough to cover the full height. Use root.height instead. - tst_QQuickDrawer::multiTouch For this test the QML file was fixed to explicitly specify the Drawer's width to be 200 instead of window.width / 2, because the latter was not equal to 200 on Android. Fixes: QTBUG-100257 Change-Id: Ife962642fbe9b9b8242e00750da5a4b8462b8420 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 3b31de65972a68ddb8f3ba56cd8cb2f9aca879c2)
* QQuickFlickable: fix flicking when item is rotatedShawn Rutledge2022-05-123-0/+169
| | | | | | | | | | | | | | | | | | | | | | QEventPoint::velocity() is in screen coordinates, as documented; it needs to be transformed to local coordinates in case the Flickable is rotated and/or scaled. windowToItemTransform() gives us a composite transform matrix; we remove the translation components to get only the rotation and scaling. Also fix the press position calculation in handleReleaseEvent(). With the manual test one can pinch to scale and rotate a Flickable, then verify that with a single finger, the Flickable gets scrolled by an appropriate distance in spite of that. Done-with: Ivan Solovev Fixes: QTBUG-99639 Change-Id: I60af1dd932835d358baa1422523cc24b2ab046a0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 8068bde891eefe99a43deb83e58166b476f65225) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid memory leaks in QQuickListView and tst_qqmlinstantiatorUlf Hermann2022-05-111-9/+15
| | | | | | | Change-Id: Ieceffedb082e893b54bcda99076df3ccdeff6010 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit cf9c0f0180b65f0f2ad2cf20a35a3d11a7430927) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Respect the pixelAligned property when updating the visible areaLars Knoll2022-05-111-9/+35
| | | | | | | | | | | | | | | Ensure the QQuickFlickableVisibleArea correctly calculates the visible area when the pixelAligned property is set. Add test data for it to the overshoot() test case. The test would sometimes fail locally and not flick far enough. Stabilize it by using a larger flick velocity. Fixes: QTBUG-77055 Change-Id: Ied424c6e59d2dc4737ea3f88854daa7939930a97 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit d597172fcd11ed3d3a73d2648415bd01ff7487c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickGridView: return accurate row position when no rows are availableRichard Moe Gustavsen2022-05-102-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickGridViewPrivate::rowPosAt() returns the position of a row for a given index. At start-up, when no rows are yet loaded, a plain "(modelIndex / columns) * rowSize()" fallback calculation is sufficient. But as the user flicks around, and new rows are moving into the viewport, the current logic shifts to rely on the position of an already visible row to calculate the position of a new one. This is because the fallback calculation above will assume that row 0 always starts at contentY == 0, which is not always true for GridView - sometimes it will place rows outside the content item to make room for rows that were added after start-up. Likewise, if the cellWidth/Height changes, it might force existing rows to be placed outside the content item. So using an already loaded row as a reference becomes more accurate, especially when flicking slowly. The problem is that the fallback calculation is not only used at start-up. It's also used when e.g moving the content item a long distance in one go by e.g setting contentY directly, call positionViewAtBeginning(), or scroll using a ScrollBar. In that case, there will be no existing rows to rely on, since they have all been moved out of the viewport. Instead the error prone fallback calculation will be used. This patch will therefore adjust the fallback calculation to take all the necessary information into account, so that rowAtPos() returns the right position of a row, even when no rows are available as a reference. This will fix at least two bugs that happen because row 0 actually starts at a negative contentY, rather than at contentY == 0. Fixes: QTBUG-91461 Fixes: QTBUG-92868 Change-Id: I21be6846809ddedf3dba0c3212693e8063411166 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit d0d6f70c91b1463e9f5b7a25d4e391cffb4fa5af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* ComboBox: clear selection when text that matches existing item acceptedMitch Curtis2022-05-101-0/+37
| | | | | | | | | | | | | | When typing "B" in the text field of an editable ComboBox whose model contains "Apple", "Banana" and "Coconut", and then hitting Enter, any selected text should be cleared. This is how widgets behaves, and also how ComboBox already behaves when typing a lowercase "b". Change-Id: I18f28d246a7853280b2e2d3b4288278b9dd45ebb Fixes: QTBUG-75197 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 5bd799a39dcc2f9bb3a7ef7d0d3d605c7e4ba8ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* lifecycle test: fix Clang warning about a final dtorMarc Mutz2022-05-101-2/+2
| | | | | | | | | | | | | | | | | | Says Clang: tests/auto/qmlls/lifecycle/qiopipe.cpp:75:23: warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class] ~QIOPipePrivate() final; ^ tests/auto/qmlls/lifecycle/qiopipe.cpp:70:7: note: mark 'QIOPipePrivate' as 'final' to silence this warning class QIOPipePrivate : public QObjectPrivate ^ Mark the whole class final instead of just the dtor. Change-Id: I1b5064c4f7a722738d055d004b5e38f153411f55 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d432e5621a0a163ea5609229ef94f83235de4050) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Do not re-source the from value in animation with multiple loopsAndreas Buhr2022-05-092-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Animations with multiple loops without an explicitly set 'from' value were trying to use the last value from the previous loop as the new starting value for the next loop. This is not correct for several reasons: - when we have multiple loops, it's not guaranteed that the last value of the previous loop is actually the 'to' value. In practice it is a bit smaller. - even if it was the expected 'to' value, the next loop would have been executed in the range [to; to] - so nothing would have happened. The code in bugreport for the related issue tries to implement a binding: NumberAnimaton { // note that the 'from' property is not defined here to: from + 360 loops: Animation.Infinite } But I believe such binding does not work in practice, because the 'from' *property* is not actually updated at each loop. So the most reasonable approach for the animations with multiple loops is to use their initial 'from' value, and do not update it while looping. Fixes: QTBUG-84375 Change-Id: I550873887bf8a328fe4eda9b0e8e058f921124b1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit cc49e68bdf5be947cd9a6aac07bc9915fe0c5af4) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* V4 Engine: Don't try to convert JS functions to other typesUlf Hermann2022-05-091-0/+4
| | | | | | | | | | | | When converting a JS value to a variant, if we notice that we get a QJSValue again, there is no point in trying to convert it further. We'll just run into infinite recursion. Fixes: QTBUG-102545 Change-Id: I0a40e21287e5460e5e214101aabe8d2b4bf0afad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2bed3d5f0ff7de2774e8e4a1ea164063e8d5aa0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmltc: Support setting Gradient property of RectangleAndrei Golubev2022-05-097-0/+80
| | | | | | | | Fixes: QTBUG-102560 Change-Id: I7c339d2807a723f38e18e06b944362449d89ad7a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit e98faf1df401268dc6966b39963547a4de6f9171) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Android: enable tst_qqmlenginedebugserviceIvan Solovev2022-05-098-85/+268
| | | | | | | | | | | | | | | The test was failing because it was using QML code that was embedded directly in the test, so the dependencies were not detected and deployed. This patch moves QML code into separate files, so that qmlimportscanner could provide all the necessary dependencies. Fixes: QTBUG-100166 Change-Id: I5581de9a4573204722ad60eaceae8d05a491eb13 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit ecc87ea07723998dcfa947353e4259ec8d057035) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>