aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
Commit message (Collapse)AuthorAgeFilesLines
* Expect failure for certain fonts in TextArea testEskil Abrahamsen Blomfeldt2020-04-301-2/+20
| | | | | | | | | | | | | | Change f761ad3cd9ad1252f24b76ae413298dc7bed8af3 in qtbase exposes a pre-existing difference in measuring the height of QTextLayouts versus QTextDocuments when the leading is large enough to impact the font height. See QTBUG-82954 for details on this. Note that this is equivalent to the fix for the same issue in the QLabel test: c4ef0b92d5fb2c621e880347bd48d01b6f31eb24 Task-number: QTBUG-82954 Change-Id: Idee81dcceefe594059a06bd1f090650acd738f79 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-311-8/+9
|\ | | | | | | Change-Id: Ie09cfdd17b00e56f3ba8677d25b24417dd4e42f6
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-211-8/+9
| |\ | | | | | | | | | Change-Id: I9ecddc7a68da4f15ee2c2904e237496eb6a2aa26
| | * Menu: account for the scale when getting the size before positioningAndy Shaw2020-03-181-8/+9
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-73687 Change-Id: Id2d6a6b5c6651337ab7ae26d07011160b79654bf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Fix Qt 6 to-do comments in QML filesMitch Curtis2020-03-232-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove what appears to be code for backwards compatibility in the sizing of certain controls. Removing the code shows no discernible difference in the appearance of those controls. [ChangeLog][Controls][Tumbler] implicitWidth and implicitHeight must now be provided for Tumbler's contentItem, as with all other controls. Change-Id: Id858b6d13bfd81d8f30be57290fb260404652a4c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove the remaining usages of QRegExp and QRegExpValidatorLars Knoll2020-03-192-9/+9
| | | | | | | | | | | | | | | Change-Id: Iab8e682eeb43b3403eba37f7decb7f7a494ae361 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-03-181-1/+69
|\| |
| * | SplitView: fix hidden items causing visible items to not be resizableMitch Curtis2020-03-131-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a handle is dragged, the items on either side of it are resized. Until this patch, we were assuming that the item after the one at the handle index was visible, which was wrong. Now we iterate through each item after the one at the pressed index until we find one that's visible. Since we need this in a few other places during a handle drag, we cache it as a member variable. This patch also fixes an issue where the visibility of handles were not updated after setting a new handle delegate. Change-Id: Icd246abae2ed4dc6c3b81217b9a241b7e4debf7d Fixes: QTBUG-81867 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-1710-15/+366
|\| | | | | | | | | | | Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
| * | Attempt to stabilize test_openDuringExitTransitionWithTimeout()Mitch Curtis2020-03-041-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was unable to reproduce the failure, but this patch should hopefully make the test more resilient to timing issues by not requiring that the popup's opened property is true, but rather that it was true at some point. Change-Id: Icbb0407683959b9fc01b3c0d66d632922363b5d9 Fixes: QTBUG-82643 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-225-7/+51
| |\| | | | | | | | | | Change-Id: Iff02839c8ace49582750e06fa1ea9c559f6c93fe
| | * Fix clicked() being emitted after doubleClicked()Mitch Curtis2020-02-204-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do as MouseArea does, and keep track of double clicks ourselves, otherwise we think the second click is a regular click. This is for mouse events only; for touch we have bigger problems to solve first: QTBUG-82146 Change-Id: I46e816d0cfa1bab98a0a1685915842ebd176e762 Fixes: QTBUG-82032 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * ToolTip: fix timeout not activating if opened during exit transitionMitch Curtis2020-02-201-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a tooltip with an exit transition and a timeout is made visible during its exit transition, it would end up not timing out. This is because the change in the tooltip's visibility is what usually kicks off the timeout timer, but if there is no change in visibility (because the exit transition hadn't finished, so the tooltip was still visible), this won't happen. Fix the issue by calling startTimeout() in QQuickToolTip::setVisible(). Change-Id: I5f95a698e48f376c7597558572ac91625a276e53 Fixes: QTBUG-81935 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-303-0/+262
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_combobox.qml Change-Id: I8471cdac4397f77a8e58140d58c6b50d3c437928
| | * StackView: fix an issue where the current item was hiddenMitch Curtis2019-12-121-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a StackView has an item A as the current item, calling replace(B) and then replace(A) would result in A being hidden when all transitions were finished. When an item is finishing its transition, we can check to see if that item exists in the stack (i.e. was pushed while it was transitioning), and if so, don't hide it. The patch is based on the one from Anthony Groyer. Fixes: QTBUG-57267 Change-Id: I441559c54a35c577261074bc7f0c923aeb3ca330 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * ComboBox: change currentIndex (if applicable) when focus is lostMitch Curtis2019-12-101-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user enters text into an editable ComboBox that matches the text of an entry in the model, and then tabs out to another item, the currentIndex should be changed to that entry. This brings the behavior of ComboBox in line with QComboBox. Change-Id: Ibb1e201a503704681ebcbc7135d1964cc1f6bbca Fixes: QTBUG-78885 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * StackView: fix crash when recursively removing itemsMitch Curtis2019-12-051-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen when e.g. calling clear() in Component.onDestruction in response to a pop() call. The patch fixes the crash by warning and returning early. If users really need to do this, the clear() call can be delayed: Component.onDestruction: { Qt.callLater(function() { stackView.clear(StackView.Immediate) }) } Change-Id: If3cf07495bb34b96089522f44c36976bd6c62492 Fixes: QTBUG-80353 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * SplitView: fix hoverable child items breaking handle hover stateMitch Curtis2019-12-041-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Detect HoverEnter events by filtering the mouse events of child items, and respond by clearing any hovered handle. Change-Id: Ice7e7fe3cc4c9224064c2384cd832e4a7d91c4da Fixes: QTBUG-79846 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | ComboBox: add selectTextByMouse propertyMitch Curtis2019-12-121-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows configuring the selectByMouse property of the underlying TextField for editable combo boxes. Named selectTextByMouse instead of selectByMouse to avoid confusion with selection of the items themselves. [ChangeLog][Controls][ComboBox] Added selectTextByMouse property. Change-Id: I852e4cd44ebe6b2a1ed2535513ea2fc35cbe0a32 Fixes: QTBUG-71406 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-301-8/+14
| |\| | | | | | | | | | Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
| | * tst_dial: fix test_dragging afer mouseDrag() changesMitch Curtis2019-11-231-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 02ffe50af41526f604ae61d41bf2150037d67473 fixed some incorrect behavior in mouseDrag() that these tests were unknowingly relying on. Fixes: QTBUG-80153 Change-Id: I486061cc7d7fe44ef7b9ff8924c711572a01e44a Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Don't delete items we didn't createMitch Curtis2019-11-281-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until this patch, we've always deleted "old" items when a new one is assigned. For example, the style's implementation of contentItem will be destroyed here as it is not accessible by the user and is no longer used: Button { contentItem: Item { /* ... */ } } This was especially important before the introduction of deferred execution, as the "default" items would always be created, regardless of whether the user had overridden it with one of their own items. By deleting the old items, we free unused resources that would otherwise persist until application shutdown (calling gc() does not result in the items being garbage-collected, from my testing). Although this has largely worked without issues, deleting objects that weren't created by us in C++ is not supported. User-assigned items can be created in QML (with JavaScriptOwnership) or C++ (with CppOwnership), and it is up to the user and/or the QML engine to manage the lifetime of these items. After the introduction of deferred execution, it became possible to skip creation of the default items altogether, meaning that there was nothing to delete when assigning a new, user-specified item. This requires that no ids are used in these items, as doing so prevents deferred execution. Assuming that users avoid using ids in their items, there should be no unused items that live unnecessarily until application shutdown. The remaining cases where items do not get destroyed when they should result from the following: - Imperative assignments (e.g. assigning an item to a Button's contentItem in Component.onCompleted). We already encourage declarative bindings rather than imperative assignments. - Using ids in items. Given that these are use cases that we will advise against in the documentation, it's an acceptable compromise. [ChangeLog][Important Behavior Changes] Old delegate items (background, contentItem, etc.) are no longer destroyed, as they are technically owned by user code. Instead, they are hidden, unparented from the control (QQuickItem parent, not QObject), and Accessible.ignored is set to true. This prevents them from being unintentionally visible and interfering with the accessibility tree when a new delegate item is set. Change-Id: I56c39a73dfee989dbe8f8b8bb33aaa187750fdb7 Task-number: QTBUG-72085 Fixes: QTBUG-70144 Fixes: QTBUG-75605 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-253-17/+156
|\| | | | | | | Change-Id: I61919fabd4a3a07ed374f2c3c1fae2d589d6e124
| * Make ToolTips wrapMitch Curtis2019-11-151-0/+22
| | | | | | | | | | | | | | | | Otherwise the text will go outside the window. Change-Id: I3d50a195b1ee6c9b5d49952ef6c49d17c61372fa Fixes: QTBUG-62350 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * SwipeView: fix issue where child items couldn't get focusMitch Curtis2019-11-151-0/+49
| | | | | | | | | | | | | | | | | | Set the focus property of the contentItem (ListView) to the focus property of the SwipeView itself. Change-Id: Ic410f7fb8db9fbb758b956dfe07e1b4265f5f687 Fixes: QTBUG-62401 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-041-0/+69
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibf7cf09570e73ad2f314e9ce7acf1c766ac3f332
| | * SplitView: fix issue where Repeater items were not createdMitch Curtis2019-10-291-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SplitView's contentItem is lazily created whenever contentItem() is called. When adding regular, standalone items, they will go through QQuickContainer::addItem(), which eventually calls contentItem(). This case works fine. Repeaters, on the other hand, call setTransparentForPositioner(true), which QQuickContainerPrivate::contentData_append() checks for, and instead of calling addItem(), reparents the Repeater to effectiveContentItem() with this line: item->setParentItem(effectiveContentItem(p->contentItem)); If this happens before the contentItem is created, then the Repeater has no parentItem and won't generate any items. So, instead of using the contentItem member directly, call contentItem() to create it if it doesn't exist. Fixes: QTBUG-79302 Change-Id: I258f7420d2fea843ed045d569f80e92fe1f507d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-261-17/+16
| |\| | | | | | | | | | Change-Id: I5da24592eb292ef4f430d734fec234166ce6e1e3
| | * tst_splitview.qml: remove unused SplitViewsMitch Curtis2019-10-241-17/+0
| | | | | | | | | | | | | | | | | | | | | These make debugging SplitView issues very confusing. Change-Id: Iea09bd5339044ac330188233286acc695e335283 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * Fix assertion failure when hiding a SplitView with only one itemMitch Curtis2019-10-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Check for -1 when calling handleIndexForSplitIndex(). Change-Id: I81021b64265ace0c47269ea54e538a2725c84b79 Fixes: QTBUG-79270 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Regenerate projects to be in syncAlexandru Croitor2019-11-155-5/+5
| | | | | | | | | | | | | | | | | | Change-Id: I3a57449c9025e22414b8337fcffdeb0f4d769af2 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-155-13/+117
|\| | | | | | | | | | | | | | | | | Removed dependencies.yaml. Change-Id: I1e2b3f486e9ace4bc8dc0419a64848990b3a6b39
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-012-3/+33
| |\| | | | | | | | | | Change-Id: I53fc18c168daff6dfb504e5a64e20570de7d24ac
| | * QQuickToolTip: fix setTimeout() behavior when tool tip is visibleKonstantin Ritt2019-09-271-0/+9
| | | | | | | | | | | | | | | | | | | | | by applying the passed timeout value prior to re-starting the timer Change-Id: I27953dbb4781b5cb0c2039d56faa56f3c000206f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Tumbler: fix displacement calculation when wrap is falseMitch Curtis2019-09-241-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the position of the item and the currentItem in the calculation in order to get reliable results. This fixes the displacement being off by a small margin, which increased as the delegate height became smaller. Fixes: QTBUG-66799 Change-Id: Ieca5033fb4c0ed62f5965a21fcab7aa558bd40e6 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-241-0/+68
| |\| | | | | | | | | | Change-Id: I34f3fa5e3cd2ebb0ed8f7d4e6d5ed6f66422a48d
| | * TextArea: prevent changing size of background recursivelyKonstantin Ritt2019-09-191-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the x/y position of background depends on the height/width of background and these values are not constant, the if statement in the method resizeBackground() will always pass. And since `resizingBackground` guard wasn't checked, any geometry change will always call resizeBackground() and then call themself recursively (via the change listener), that means the height/width of background will always be reset, no matter what value you set. Another part of the issue was in determining the extra bits too late: in case the background gets parented by the flickable, the new child caused the flickable to re-calculate its metrics and thus resize the background *prior* to remembering if it has w/h set. As a side effect, this fix also brings the possibility to reset previously set w/h to get the default background sizing behavior. Inspired by da06da57002b64cf4bcde0ca708b3275a5f919ae [ChangeLog][QtQuick][QQuickTextArea] prevent changing size of background recursively in construction Fixes: QTBUG-76369 Change-Id: Ide51ec1ebab63605ae3bfcc10a76a28be960ef36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-112-10/+16
| |\| | | | | | | | | | Change-Id: I60cfd7fbece6d34349767d13d376b7494eb525b2
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-1/+7
| | |\ | | | | | | | | | | | | Change-Id: Ifa88045268cdaa1adc0b1e206d5e20a3721d3837
| | | * QQuickIcon: properly resolve implicit valuesKonstantin Ritt2019-09-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the property has not been set explicitly, the resolved mask must not contain a respective bit set either Change-Id: Iab0bd600b5bf458e26ed4601d4d2f608021f1518 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | tst_dial: fix copy-paste mistakeMitch Curtis2019-09-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Slider was incorrectly used in a03b6fec6. Change-Id: Ib76172f9ea0dca3b776a74df2329bd63c72f8517 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | | Convert QtQuickControls2 testsLeander Beernaert2019-10-086-0/+146
|/ / / | | | | | | | | | | | | | | | | | | | | | Initial conversion of QtQuickControls2 tests. Change-Id: I7e09e387ec90f89cc2856c7f7f2cb810b03b7fa3 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-043-0/+110
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-043-0/+110
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/accessibility/tst_accessibility.cpp Change-Id: I0bc187e2a8edb4e357c1bf114dd9b1977d5c1e45
| | * Add a test for having a ShaderEffect as a delegateJan Arve Sæther2019-05-221-0/+58
| | | | | | | | | | | | | | | | | | Change-Id: If4f3dca99638015b479509e4aa73e0190b1182ac Task-number: QTBUG-67343 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Don't unnecessarily transform keysequences into stringsUlf Hermann2019-05-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we cannot interpret them as the original key sequence anymore. When passing them on they are interpreted as the number key that represents the numeric value of the key sequence enum. Change-Id: Idd94ef95bc693cb6d51162dd1994adc953b52e25 Fixes: QTBUG-75572 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Container: Keep currentIndex at 0 when removing item 0 if possibleJüri Valdmann2019-05-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current behavior is to always decrement the currentIndex when the current item is removed -- even when the current item is item 0. This means, for example, that in a TabBar with three tabs and the first tab selected closing the first tab will leave nothing at all selected. Change behavior to keep currentIndex at 0 if there are still items left in the container. Now closing the first tab will leave the next remaining tab selected. Change-Id: If4e1903366e29fcee8226b776d5b2e03cec189df Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | unblacklist passing testsDaniel Smith2019-06-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: I0f49529cc567fcc8eaffbe06adb4b260cd1a9e06 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-151-5/+13
|\| | | | | | | | | | | Change-Id: Id8cb931daffd3dd0f75c283a9adb98ddc976973b
| * | SplitView: fix preferredHeight not being restored in restoreState()Mitch Curtis2019-06-101-5/+13
| | | | | | | | | | | | | | | Change-Id: Icc236494f5df382d6bc49092d23a460822c835a1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>