aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols2/qquickdrawer/tst_qquickdrawer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove "2" from Qt Quick Controls directoriesMitch Curtis2022-12-011-1367/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick Controls 2 was named that way because it was a follow-up to Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer supported, we don't need to have "2" in the name. Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. By doing this renaming a few weeks before feature freeze, it won't affect the release but still results in as little time possible spent manually fixing conflicts in cherry-picks from non-LTS releases as a result of the renaming. This patch does the following: - Renames directories. - Adapts CMakeLists.txt and other files to account for the new paths. A follow-up patch will handle documentation. It does not touch library names or other user-facing stuff, as that will have to be done in Qt 7. Task-number: QTBUG-95413 Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634 Reviewed-by: Mitch Curtis <[email protected]>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-94/+94
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <[email protected]>
* Fix window activation usage in tst_QQuickDrawerEskil Abrahamsen Blomfeldt2022-06-301-12/+14
| | | | | | | | | | | | | - Skip tests that depend on programmatic window activation on platforms where this is not supported, such as Wayland. - Change tests that don't rely on the window being activated to use qWaitForWindowExposed() instead. - Remove requestActivate() calls where they're not necessary. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-104242 Change-Id: I1389ec155698d081f43feb47adcfe3b08e5b7b0d Reviewed-by: Mitch Curtis <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-111-28/+3
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Replace uses of deprecated _qs with _s/QStringLiteralSona Kurazyan2022-04-291-1/+2
| | | | | | Task-number: QTBUG-101408 Change-Id: Ic925751b73f52d8fa5add5cacc52d6dd6ea2dc27 Reviewed-by: Ulf Hermann <[email protected]>
* Fix tst_qquickdrawer on AndroidAndreas Buhr2022-04-251-8/+8
| | | | | | | | | | | | The correct result may have fractional value. It was calculated in integer. This made the 'expected' value wrong. This patch changes the calculation to happen in double precision, thus fixing the test. Pick-to: 6.2 6.3 Task-number: QTBUG-101865 Change-Id: I4e165574fbf2930bfeafd925d16e455668336e6d Reviewed-by: Assam Boudjelthia <[email protected]>
* Android: fix tst_QQuickDrawerIvan Solovev2022-04-221-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Pick-to: 6.3 6.2 Change-Id: Ife962642fbe9b9b8242e00750da5a4b8462b8420 Reviewed-by: Mitch Curtis <[email protected]>
* QQuickControl: let Control reject hover eventsRichard Moe Gustavsen2022-03-301-1/+1
| | | | | | | | | | | | | | | | | | From testing Qt 6.1, a Control should not accept hover events, and as such, block hover events from propagating. This patch will make sure that QQuickControl rejects hover events, and thereby restore the behavior Qt had up till Qt 6.1. Fixes: QTBUG-101394 Fixes: QTBUG-100543 Fixes: QTBUG-100149 Fixes: QTBUG-98940 Fixes: QTBUG-98850 Fixes: QTBUG-95398 Pick-to: 6.3 6.2 Change-Id: I2df9d0f9999ce074cab0c64accad9172b411fb63 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* Do not rely on transitive includes in testsFabian Kosmale2022-02-141-0/+1
| | | | | Change-Id: Icb68dbecab6f675352cd58333c82fa6648025367 Reviewed-by: Ulf Hermann <[email protected]>
* Remember QQuickDeliveryAgent (DA) in QQuickWindowPrivate::handle*EventFabian Kosmale2021-12-021-0/+17
| | | | | | | | | | | | | | QQuickDeliveryAgent::event() is not the only way to end up in QQuickDeliveryAgentPrivate::handleMouseEvent(). We also need to remember the current DA in QQuickWindowPrivate's event handling functions, otherwise the logic to track grabbers is broken when QQuickOverlay::eventFilter() calls them, because DA::onGrabChanged contains a check that the handling DA is the current DA. Fixes: QTBUG-97461 Pick-to: 6.2 Change-Id: I66d94d84857d9b603e58b0286cbcdedfcaae62af Reviewed-by: Shawn Rutledge <[email protected]>
* Fix license of tests from LGPL3 to GPL-EXCEPTKai Köhne2021-11-291-17/+9
| | | | | | | | | | | | Autotests in Qt are usually GPL3, or BSD. No point in using the LGPL here. This also gets rid of last references to LICENSE.LGPLv3 in this repository, so we can delete both LICENSE.LGPLv3 and LICENSE.GPLv3, which it references. Change-Id: Idbdefe0c68cc8047ede72b439a4d7ff40dfd71b6 Reviewed-by: Volker Hilsheimer <[email protected]>
* Consolidate test helpers into private librariesMitch Curtis2021-09-131-22/+33
| | | | | | | | | | | | | | | | | | | | Previously each test would include and build sources from the shared folder. Now we make those sources a library, build it once, then have each test link to it instead. We also take the opportunity to move some helpers that qtquickcontrols2 had added into the quicktestutils library where it makes sense, and for the helpers that don't make sense to be there, move them into quickcontrolstestutils. We add the libraries to src/ so that they are internal modules built as part of Qt, rather than tests. That way we can use them in a standalone test outside of qtdeclarative. Task-number: QTBUG-95621 Pick-to: 6.2 Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a Reviewed-by: Fabian Kosmale <[email protected]>
* Restructure tests in preparation for merging into qtdeclarativeMitch Curtis2021-07-221-0/+1352
Task-number: QTBUG-95173 Change-Id: I541dc26cf2cdd6f2640824f693f7d059445367d9 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>