aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Remove qtquickcontrols2 sources and explain where they wentHEADdevMitch Curtis2021-08-16786-152265/+0
| | | | | | | | | | | | Now that qtquickcontrols2 has been merged into qtdeclarative, we should make it obvious that this repo should no longer be used, by preventing it from being built. Task-number: QTBUG-95173 Pick-to: 6.2 Change-Id: I95bd6a214f3d75a865ab163ee0a1f9ffbeb7a051 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix test pathsMitch Curtis2021-07-2627-30/+31
| | | | | | | | | | In preparation for merging into qtdeclarative Task-number: QTBUG-95173 Change-Id: I0c91c9af85ca63ca8c7f7184d41f299030e12a0e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add missing QQuickControl testVolker Hilsheimer2021-07-221-0/+1
| | | | | | Pick-to: 6.2 6.1 Change-Id: Ifa7807c992156229fb805bdae4f553d921bfe8c1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Restructure tests in preparation for merging into qtdeclarativeMitch Curtis2021-07-22786-67/+68
| | | | | | | Task-number: QTBUG-95173 Change-Id: I541dc26cf2cdd6f2640824f693f7d059445367d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix warning in RangeSlider::test_touchDragThreshold testMitch Curtis2021-07-121-1/+1
| | | | | | | | | | | The warnings were: TypeError: Cannot assign to read-only property "first" TypeError: Cannot assign to read-only property "second" Pick-to: 6.2 Change-Id: Ida6b0e4491f9ef867454b32c0ce1c4cd33dd841f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Stabilize tst_QQuickPopup::macOS::activeFocusOnClose2Shawn Rutledge2021-07-071-0/+1
| | | | | | | | The button starts out zero-size with macOS style. Pick-to: 6.2 Change-Id: Ib960188c8103943c5466812de80785dd90353679 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Stabiliize tst_qquickpopup::hover() on macOSShawn Rutledge2021-07-071-0/+1
| | | | | | | | | The popup seems to have a size of 1,1 for a short time with -style macOS, so just wait for it to expand before doing any hover testing. Pick-to: 6.2 Change-Id: I87787d53c2fcaf0efe0625b2f132b5d8acfd19d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Be sure to click outside the menu in tst_QQuickMenu::mouse()Shawn Rutledge2021-07-071-1/+2
| | | | | | | | It seems that with Fusion style, the menu is somehow larger. Pick-to: 6.2 Change-Id: I2270d5db3cdb89da36f31d5b49225c16e34f114f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_splitview.qml: ensure hover events are sent to handlesMitch Curtis2021-07-071-1/+2
| | | | | | | | Task-number: QTBUG-94968 Change-Id: I7bc4ef907097fe7b1517f9419942fbfe06a4cc62 Pick-to: 6.2 Reviewed-by: Igor Bugaev <freedbrt@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_abstractbutton.qml: give buttons a sizeMitch Curtis2021-07-071-0/+4
| | | | | | | | | | | | They're abstract hence not styled, so they won't have a size, and after the recent changes to qtdeclarative, will not receive events. Amends 6ea8c21ccf1bf4f88361bc1ad99944b1cf38aba4. Pick-to: 6.2 Change-Id: Ic79777cb60fbe593f4c09bec98e6e0fec379cfb9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Igor Bugaev <freedbrt@gmail.com>
* tst_qquickdrawer: parent should not be hovered when child is hoveredRichard Moe Gustavsen2021-07-071-1/+1
| | | | | | | | | | | | | | | | | There are two ways of working with hover events in Quick; Either by using pointer handlers (typically from QML), or by using hover events (typically from c++). The former will currently always propagate hover events up the parent chain, while the latter will block propagation by default, unless the event handler rejects the event. Since the test in this patch is testing hover events, and not hover handlers, we should expect the parent (drawerItem) to not be hovered when the child (drawerButton) is hovered. Pick-to: 6.2 Change-Id: Ia8fb8a29f7cefe07d4ec86db016e51f8d71ecb06 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Stabilize tst_QQuickDrawer::Windows::slider(mouse)Igor Bugaev2021-07-071-0/+4
| | | | | | | | Need to wait before and after mousePress for some reason Pick-to: 6.2 Change-Id: I34a82341dee48492bb4215ee86887ccfc6afbec0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tests due to QQuickItem::contains() function behavior changeIgor Bugaev2021-06-308-34/+40
| | | | | | | | | | A lot of tests broke because they used to rely on the behavior that you can send an event to an item on its right and bottom edge, and the ability to send an event to an item of zero size. Pick-to: 6.2 Change-Id: I9c5883ddb327c751221b4f03bb9a699d69961d3a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix warnings in tst_action.qmlMitch Curtis2021-06-221-3/+3
| | | | | | | | | | | | | | | The warnings were: Parameter "source" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. Shortcut: Only binding to one of multiple key bindings associated with 9. Use 'sequences: [ <key> ]' to bind to all of them. Pick-to: 6.1 6.2 Change-Id: I2250b6776e128debccf684f7832d8edbb093522a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do not keep QML engines alive across qmlClearTypeRegistrations()Ulf Hermann2021-06-171-1/+2
| | | | | | | | | | Otherwise the builtins don't get re-registered afterwards. Fixes: QTBUG-94575 Pick-to: 6.2 Change-Id: I7fa4965d5147adf0cc437d1b6102815cc206a6ea Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickComboBox: fix acceptableInput being wrong if no validator was setOliver Eftevaag2021-06-171-0/+40
| | | | | | | | | | | | | | | | | | This patch fixes an issue with hasAcceptableInput(), if the property would be read before the contentItem had been set by the qml engine. This would cause hasAcceptableInput to return false by default, even though the default value is supposed to be true, if no validators or inputMasks are being used. The solution that I've chosen, is to give the QQuickComboBox its own acceptableInput variable, and connect the contentItem's acceptableInputChanged() signal to a function that polls for the contentItem property, and updates its variable accordingly. Fixes: QTBUG-94307 Pick-to: 6.2 6.1 5.15 Change-Id: I587d76162e75544a7ed1df9e3b9104bd73013bb0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use the added placeHolderText color available in PaletteAndy Shaw2021-06-174-0/+4
| | | | | | | | | | This allows it to pick up the Palette's placeHolderText color by default while still using the property if it is overridden with that. Pick-to: 6.2 Task-number: QTBUG-93746 Change-Id: Ie6af95d6c60fa80f2789c2acd5964b5a347194ce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix tst_palette by setting inactive color groupVolker Hilsheimer2021-06-161-0/+5
| | | | | | | | | | | Same colors as active, so that the binding test passes without having to wait for the window to become active. That's not what that test cares about. Fixes: QTBUG-94553 Pick-to: 6.2 Change-Id: I7b3cfb16ff6f64703faee0b2c90183af831390e5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix SwipeDelegate losing swipes to parent flickablesMitch Curtis2021-06-161-5/+35
| | | | | | | | | | Use a smaller threshold than Flickable so that it doesn't steal our events. Fixes: QTBUG-55705 Pick-to: 5.15 6.1 6.2 Change-Id: I7e985c27788818226a3158078d485ea12ddd7006 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add recursion guard to QQuickApplicationWindowPrivate::relayout()Jan Arve Sæther2021-06-162-0/+103
| | | | | | | | | | | | | relayout() might change the size of the header, footer or contentitem When one of those items changes, QQuickApplicationWindowPrivate will get notified by that through QQuickApplicationWindowPrivate::itemGeometryChanged(). itemGeometryChanged() will then call relayout()... (*recursed*). Pick-to: 5.15 6.2 Task-number: QTBUG-87708 Change-Id: I9403952e776afb2be37d009642c65b5520c79341 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Blacklist some flaky tst_qquickpopup functions on openSUSEMitch Curtis2021-06-161-0/+9
| | | | | | | Task-number: QTBUG-94251 Pick-to: 5.15 6.1 6.2 Change-Id: I5f06bba2522c07a29897501932c02b87e9cae356 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist some flaky tst_qquickdrawer functions on openSUSEMitch Curtis2021-06-161-0/+8
| | | | | | | Task-number: QTBUG-77946 Pick-to: 5.15 6.1 6.2 Change-Id: I11f3e275d76833754a994d1bf09e50fa1328828c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qquickpopup: Don't leak created objectsUlf Hermann2021-06-151-1/+2
| | | | | Change-Id: Ie1359fb407088adcc91b45ae18c682dda8822a67 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix warnings in some testsMitch Curtis2021-06-144-30/+29
| | | | | | | | | | | | | | The warnings were all along the lines of: TestCase.qml:672: Error: Cannot assign [undefined] to double At some point the behavior was changed so that you can no longer pass undefined to initial property values, so account for that by having the data rows construct the properties object directly. Pick-to: 6.2 6.1 5.15 Change-Id: I7180e9fc664650b87ae0305b7f829cd7266be1ab Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* AbstractButton: emit doubleClicked() for touch eventsMitch Curtis2021-06-096-0/+55
| | | | | | | | | [ChangeLog][Controls][AbstractButton] doubleClicked() is now also emitted for touch events. Fixes: QTBUG-82146 Change-Id: Ie1e24d291bd4b592edd91fc762da8636e08698df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Stabilize tst_qquickpopupFabian Kosmale2021-06-092-22/+33
| | | | | | | | | | | - Give the window system some time to change the cursor - Wait for popups to be properly opened and closed Task-number: QTBUG-94251 Change-Id: Ie380312daddcb2ee95f337c321ca2724c3b9f182 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add new control: SelectionRectangleRichard Moe Gustavsen2021-06-061-0/+311
| | | | | | | | | | | | | | | | | | This patch will add a SelectionRectangle to controls. A SelectionRectangle can be used together with TableView to let the user select cells using either pointer Drag or PressAndHold. It lets the developer set their own handle delegates, or simply use the included ones added to the Basic style. [ChangeLog][Controls][SelectionRectangle] A SelectionRectangle has been added to Controls. A SelectionRectangle can be used to make selections in TableView. Fixes: QTBUG-74750 Change-Id: Ia7af578c1c905b0e92df193d7820ad6ef2c9b697 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update to latest qml CMake APICraig Scott2021-06-0529-31/+32
| | | | | | | | | | | | | | The new qml CMake API places a closer relationship between the backing target and the plugin target. Both are typically created together and they share a lot of common details. Instead of creating them in different parts of the source tree, they are now specified together. The src/imports area has effectively been absorbed into the other corresponding subdirectories below src with this change. Task-number: QTBUG-91621 Change-Id: I9bd32e9eb78c198ccc9db04e2829303cac323502 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add FontDialog to QtQuick.DialogsOliver Eftevaag2021-06-045-0/+629
| | | | | | | | | | | Adding non-native FontDialog to QtQuick. This is a native FontDialog on platforms that support it, and a non-native Qt Quick FontDialog on platforms that don't. Fixes: QTBUG-87799 Change-Id: I43a59e3668a8a40f1d0c04a3c2506283d552a22b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QtQuick.DialogsMitch Curtis2021-05-2715-0/+1978
| | | | | | | | | | [ChangeLog][QtQuickDialogs] Added FileDialog. This is a native FileDialog on platforms that support it, and a non-native Qt Quick FileDialog on platforms that don't. Fixes: QTBUG-87797 Change-Id: Ia3a98b616479b818c96c232a0329750023079642 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Revert "AbstractButton: set automatically as checkable when being checked"Alexander Akulich2021-05-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8ba12ed7f25d8cfb7619b6eb0a26fe4ae3e823b1. The referenced commit was introduced to simplify buttons setup: Button { checked: true } Button { checkable: true } With the commit the first button becomes 'checkable' automatically. However, the implemented behavior violates the principle of least surprise, listed in "API Design Principles". The following checkbox will be checkable despite of the explicitly set properties: CheckBox { checked: true checkable: false } This is a "surprising" behavior which makes some rare and already complex use-cases unnecessarily complicated. The save of explicit "checkable: true" does not justify the surprice and the ugliness of the code needed to overcome the forced checkable property if needed. [ChangeLog][Important Behavior Changes] Setting the AbstractButton's 'checked' property to 'true' does not automatically set its 'checkable' to true anymore. Fixes: QTBUG-93807 Change-Id: Ia35138ee6a09bb9f361f52a84e53578b0b6e57e3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix layout is always RTL when locale is RTLHyunkook Khang2021-05-267-56/+73
| | | | | | | | | | | | | | | | isMirrored() will always return true when locale is RTL, so that we cannot change the layout. To fix this, remove out the relation between LayoutMirroring.enabled and locale's text direction. [ChangeLog][Controls][Important Behavior Changes] Control's locale property no longer affects layout direction. Use LayoutMirroring instead. Fixes: QTBUG-91227 Change-Id: Ibedd3f09828f81f1889077892452a27c90e21533 Reviewed-by: Hyunkook Khang <hyunkook.khang@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* TextArea: Detach the flickable when it is deletedAndy Shaw2021-05-261-0/+15
| | | | | | | | | | | When the flickable is deleted before the TextArea is (which can happen when it is a child of a ScrollView) then we need to make sure that the TextArea no longer keeps a reference to the Flickable object. Fixes: QTBUG-93958 Pick-to: 6.1 5.15 Change-Id: I1745065370718e60bc459192e15eae0e1ba36231 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use fixed qt_add_resource BASE argumentJoerg Bornemann2021-05-221-2/+2
| | | | | | | | Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ie638443a76623df0ec20fbcd5485af59866deee6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Hide old scroll barsMitch Curtis2021-05-192-0/+65
| | | | | | | | | | Reuse the hideOldItem added in 80f1186338bcf8c7d692b4fadfc46531c002c6b0 to unparent and hide them. Fixes: QTBUG-89126 Pick-to: 6.1 5.15 Change-Id: I641e46571b8ac42e0e5080b6737f305ff59afd51 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ToolTip: use contentWidth of Text contentItem to account for newlinesMitch Curtis2021-05-111-0/+18
| | | | | | | | | | | | | | | | By default, QQuickPopupItem uses the implicitWidth of its contentItem, which is too large in the case of a ToolTip with newlines in the text. In that case, contentWidth refers to the width of the text including newlines, so we use that instead. [ChangeLog][Controls][ToolTip] The implicit width of ToolTips now accounts for newlines in the text. If you want to use the old behavior, set ToolTip's contentWidth to implicitContentWidth. Fixes: QTBUG-83630 Pick-to: 6.1 5.15 Change-Id: I7ca3805429acb68a13ead8f3545bb84a51fb1b72 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Slider: Fix broken NoSnap and SnapOnRelease modeJonas Karlsson2021-05-071-30/+44
| | | | | | | | | | A NoSnap and SnapOnRelease mode should always update the sliders position even if the value is not updated. Fixes: QTBUG-76136 Change-Id: I6cf6f948bfe582acc7f105373fb1938353acf2e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickDial: Keep value integer if everything is integerFabian Kosmale2021-05-031-0/+15
| | | | | | | | | | | | | | | | If a user uses integer values for stepSize, from and to in a Dial, they most likely want the actual values of the Dial to be integers, too. Detect this condition, and store it in a new boolean member. If the condition is met, we round the value in QQuickDialPrivate::valueAt (which, due to floating point math might not be an exact integer). As a drive-by, reorder the boolean members to introduce no additional space overhead. Pick-to: 6.1 5.15 Fixes: QTBUG-92214 Change-Id: If4633fae1d7d425ca7fb767c7284d6f8ea7ce78c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickApplicationHelper: error-check after createWithInitialPropertiesMitch Curtis2021-04-271-1/+1
| | | | | | | | Unlike create(), it does produce errors that will not always be noticeable if we don't check for them. Change-Id: Ia3adad6937de5f9b923e0e1593486b8ae11c3c68 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ScrollView: fix crash when scrolling with zero-sized itemMitch Curtis2021-04-231-0/+24
| | | | | | | | | | | Check if a Flickable type was actually set as the contentItem before accessing the pointer. Also warn that using a type other than Flickable is not supported. Fixes: QTBUG-93039 Pick-to: 6.1 6.0 5.15 Change-Id: I1470766c6de02b7b601edf1375791d3147f26ab5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add initialProperties argument to QQuickApplicationHelperMitch Curtis2021-04-221-2/+3
| | | | | | | This allows setting required properties on loaded QML components. Change-Id: I9737cf85fac027077df234a02f81f5499e0cb6b5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add findViewDelegateItem function to visualtestutils.hMitch Curtis2021-04-2227-1/+65
| | | | | | | | | | This helper function finds an item view delegate instance at a given index, ensuring that the view is polished and positioned at the correct index if necessary. Change-Id: Ib133914df723251835be3812c1d0654c07a99f14 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add clickButton and doubleClickButton functions to visualtestutils.hMitch Curtis2021-04-222-0/+79
| | | | | | | | | These helper functions save the hassle of calculating the click position within the window manually, and do a lot of other sanity checks in addition. Change-Id: I8cb53fab9c1addea15e8066e347a5c4af2700c2e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't include unused headerVolker Hilsheimer2021-04-121-1/+0
| | | | | | | | Fix compiler warning, runTests was not used. Pick-to: 6.1 Change-Id: I7ded597e992723eca2366cecfd7e231b417fc947 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Handle directly-delivered mouse events in SwipeDelegateShawn Rutledge2021-03-236-97/+3
| | | | | | | | | | | | | | | | | Delivery order has changed to be the same as the z-axis stacking order (since qtdeclarative 3ff11ceca37dcc4b6f0420332fa7f6aa007be7f3). Since QQuickSwipeDelegate puts its children under itself by setting negative z-values, it can now receive mouse events before those negative-z children, directly rather than via childMouseEventFilter(). It doesn't seem to be enough to ignore() the events and let them propagate: we now need to explicitly forward them to interactive child items, and to child items' Attached objects, if any. Pick-to: 6.0 6.1 Fixes: QTBUG-87018 Fixes: QTBUG-87789 Change-Id: I1e02ceddad7c3221fb09a33046941d654bfa8a4b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Binary compatibility file for Qt 6.0.0 added for QtQuickControls2Milla Pohjanheimo2021-03-221-0/+14468
| | | | | | | | Binary compatibility file added. Pick-to: 6.0 6.1 Change-Id: I72aecee565c3cb2e6726a401e37f8fef1763c63a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove references to Q_QML_PRIVATE_API_VERSIONFabian Kosmale2021-03-191-4/+0
| | | | | | Change-Id: I476fd6dc9bb87dc95265bd92dbb6beeb684644f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add override keyword in tests to silence compiler warningsVolker Hilsheimer2021-03-171-3/+3
| | | | | | Pick-to: 6.1 Change-Id: I23374064c7ebc801d8b5082aa6663ed7c0c43813 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Port from QScopedPointer to std::unique_ptrVolker Hilsheimer2021-03-171-1/+1
| | | | | | | Fix compiler warning about deprecated QScopedPointer::take. Change-Id: I7300e0a4eab5fca101b8b3127abf12e88359a5ca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix compiler warnings, add overrideVolker Hilsheimer2021-03-178-9/+9
| | | | | Change-Id: I547e94213f4b4d2c3ca3aeaa06330069e6311043 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>