aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-075-5/+5
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I4a690095fcd4b1141550de86b6820ae2dd579429 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Default to the most appropriate built-in style if none is specifiedMitch Curtis2020-10-073-0/+4
| | | | | | | | | | | | | [ChangeLog][Styles] An appropriate built-in style is now used as the default style if one is available for the target platform. For example, when running a Qt Quick Controls application on macOS, the macOS style will be used. On Android, the Material style will be used. When running on e.g. an embedded device, where no native style is available, use the Basic (formerly "Default") style. Change-Id: Ie61d1a8a1a83fbeba63387c7ca3671084f47bc04 Fixes: QTBUG-86403 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Unblacklist DelayButton::test_mouseMitch Curtis2020-10-075-15/+0
| | | | | | | | This passes for me locally on both macOS and Linux. Task-number: QTBUG-87018 Change-Id: I2d5f27f3f18e8c419485beb1714515b86723bb08 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Unblacklist hover testsMitch Curtis2020-10-025-60/+0
| | | | | | | | | cd669f1f216e54fa59eee77459d608a41f5df290 fixed these tests, but I forgot to unblacklist them in that patch. Task-number: QTBUG-87018 Change-Id: I50b4f571eb9b231449e320ad90da3a9d4ae59a88 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Ensure we pass coordinates to mouseMove()v6.0.0-alpha1Mitch Curtis2020-10-023-3/+3
| | | | | | | | | Unlike the other functions, the x and y parameters do not currently default to the center of the control if unspecified. Change-Id: Ie6c5945c0b43f1ef0d79e76a96da18ea102a50e2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Temporarily blacklist failing touch testsMitch Curtis2020-10-025-0/+175
| | | | | | | | | | So that we can unblock CI. The failures need more time to be looked into. Task-number: QTBUG-87018 Change-Id: I350a4100011127588077edecb73ae11078100940 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_abstrbutton: do press/move/release sequence not press/press/releaseShawn Rutledge2020-09-301-1/+1
| | | | | | | | Amends 6115585477bea66d90acbbd8a25b898d121bd50e Task-number: QTBUG-87018 Change-Id: I3c742bd8fc593f4d3a4f33104e708344fdafe3ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename "Default" style to "Basic"Mitch Curtis2020-09-2417-31/+31
| | | | | | | | | | | | [ChangeLog][Styles] The Default style was renamed to Basic to account for the introduction of the platform styles (macOS, Windows), which will be used by default (where possible) when no style is specified. Fixes: QTBUG-85984 Task-number: QTBUG-68814 Task-number: QTBUG-86403 Change-Id: I22b3199c8662e4ee5d55a1be1a51c9856ac62376 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Allow the preparation of the exit transition even if it did have focusAndy Shaw2020-09-151-0/+18
| | | | | | | | | | | | | This amends 1a5a0a591c35dcf498a232a802087683f2244ecb so that it only sets the hadActiveFocusBeforeExitTransition variable if it is false, ensuring that it is correctly handled later on if it is true from before. This handles a case of closing, opening and then closing again in one function call. Pick-to: 5.15 Task-number: QTBUG-85884 Change-Id: Ied4ca33045b005f5f666e63d85fb603e9350d982 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update the text when the inputted value is out of rangeAndy Shaw2020-09-111-0/+25
| | | | | | | | | | | | | | | | | | | When the inputted value is out of range but it would be fixed to the previous value then it would not update the text correctly to show the corrected value. This ensures that it is updated as appropriate. Before it would check if the value had actually changed after it had been fixed to the corrected value. So if it was corrected to the original value then it would not see it as having changed. Additionally the displayText also has the original text before the change, so we have to force through an update to ensure the contentItem's text is updated too. Change-Id: Ic38787d0803ab59cd998f4e2871c613f1642e764 Pick-to: 5.15 Fixes: QTBUG-85719 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickToolTip: don't specify QML import version when creating instanceMitch Curtis2020-09-071-2/+2
| | | | | | | Not all styles will have a specific version, so don't specify it. Change-Id: I92f020314d76934f286ca2946e994e2d1c5d37e5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'nativestyle' into devMitch Curtis2020-09-041-1/+2
|\ | | | | | | Change-Id: I18a4fd46cf13c65fe6f4c3981b7c61ab52109b8d
| * Merge branch 'dev' into nativestyleRichard Moe Gustavsen2020-08-2662-217/+355
| |\ | | | | | | | | | Change-Id: I9999194551f71abec3731355cd746e69e2e0b187
| * \ Merge branch 'dev' into nativestyleRichard Moe Gustavsen2020-07-172-26/+203
| |\ \ | | | | | | | | | | | | Change-Id: I5375ecd1dcbc058806e34fce757df2bf30dac16e
| * | | Let macOS have TabFocus focus policyJan Arve Sæther2020-06-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is how the macOS platform behaves. This will cause a slight behavior change for all Qt Quick Controls 2 styles on macOS, as reflected by the change in autotests. Change-Id: I9ea744737d0d157ee8c83955f718c1cd889a8c1d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Dialog: emit accepted()/rejected() before closed()Mitch Curtis2020-09-021-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, the documentation stated the following for e.g. accept(): "Closes the dialog and emits the accepted() signal." In practice, styles that have enter and/or exit transitions for Dialog result in closed() being emitted after accepted() (and rejected()). As there is no way to guarantee this particular order, we should be consistent and swap it around so that accepted()/rejected() are emitted first. [ChangeLog][Important Behavior Changes] Dialog's accepted() and rejected() signals are now emitted before closed() when calling done(), accept() and reject(). Fixes: QTBUG-85748 Change-Id: I706dda8de28c350d65e3188787af8f66a2c5f07d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | ToolTip: only begin timeout when openedMitch Curtis2020-09-021-0/+11
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old sequence of events was: 1. setVisible(true) (enter transition begins) 2. startTimeout() 3. opened() (enter transition ends) 4. time out elapses (exit transition begins) 5. closed() (exit transition ends) In most cases, a timeout would be longer than an enter transition, so the only (barely) noticeable issue would be a slightly quicker timeout than what was set. However, if the timeout was shorter than the enter transition, then the sequence would be: 1. setVisible(true) (enter transition begins) 2. startTimeout() 3. time out elapses (exit transition begins) 4. closed() (exit transition ends) This can result in the enter transition being interrupted and the tooltip never being properly visible. Avoid this by only starting the timeout when opened() has been emitted. This also brings the behavior in line with what would be expected when reading the documentation. [ChangeLog][Important Behavior Changes] ToolTip's timeout now begins only after opened() has been emitted. This bug fix results in tooltips with enter transitions being visible for the entire duration of the timeout property. This means that they are visible slightly longer than they were before, so it may be worthwhile to visually check tooltips in your application and adjust timeouts if necessary. Fixes: QTBUG-82257 Change-Id: Iebad64a8cca1f328f9ce85aa78ea0f12918dadf1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Remove all version numbers from QML importsMitch Curtis2020-08-2662-196/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | As of Qt 6, the latest version will be used by default. This saves us a lot of effort in terms of version bumps. Task-number: QTBUG-82922 Change-Id: I74eba8185ec3ccc75bc293d4b2ea87d59e2d9928 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Remove ".2" from TARGETPATH, resource prefixes, etc.Mitch Curtis2020-08-2610-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick Controls 1 will be removed in Qt 6, so now we can have the simplified path for ourselves. Having the .2 in the path causes issues for importing now that the version is being bumped to 6. Task-number: QTBUG-82922 Change-Id: I0b92cdd44c42c19b1c82e7b9a7959b86ac26c6e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Move Default style out into its own pluginMitch Curtis2020-08-2610-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In upcoming patches, we start registering C++ types declaratively. A condition of doing so requires that each .pro corresponds to one QML module. This conflicts with the QtQuick.Controls import, which currently does quite a lot: - Registers (and selects) QML files for the style that was set - Registers private C++ utility types (such as IconLabel) that are useful for all styles under the QtQuick.Controls.impl import - Registers private C++ types that are only useful for the Default style (such as BusyIndicatorImpl). The reason it does so much can probably be explained by the intended usage of Qt Quick Controls 2; when you do import QtQuick.Controls 2.0 you get access to the QML types (e.g. Button) that the style you're using provides. So if you're using the Material style, you'll get a Material style button. API-wise, the button is identical to any other button, because the types in QtQuick.Templates are what we advertise as the public API. If we didn't have this functionality, users would need to import specific style imports to use controls, and the convenience of being able to simply start the application with a different style by e.g. passing an application argument would be lost. To support declarative registration of types while also supporting the existing use cases, we split out the Default-style-specific stuff into a QtQuick.Controls.Default import. Task-number: QTBUG-82922 Change-Id: Ib4f1620cae78d7acdc13d9ac0752a020bc22f3ea Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | QQuickSpinBox: fix another "function expressions as statements" warningMitch Curtis2020-08-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends d5fbbddd7794265f24d392d33c4874ac756cb9c9 by also fixing valueFromText(). Task-number: QTBUG-64151 Pick-to: 5.15 Change-Id: I02b053bb4d4579e86eaaa2279826f3b103800fdf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | SwipeDelegate: don't allow calling close() when pressedMitch Curtis2020-08-191-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This conflicts with the behavior of SwipeDelegate. The released() or clicked() signals should be used instead. Fixes: QTBUG-85804 Pick-to: 5.15 Change-Id: I06111b63941f54c06f0e1b828d17264f37d765d5 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | SwipeDelegate: don't emit closed() when already closedMitch Curtis2020-08-191-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the mouse is released while our position is 0, it means we were clicked, and we don't need to begin any transitions to close. Fixes: QTBUG-85806 Pick-to: 5.15 Change-Id: Ic521f48e2977c1a99dbecaa585792a7798b9d749 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Prevent against re-entering prepareExitTransition after a focus changeAndy Shaw2020-08-191-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a popup is hidden, then it will trigger a prepareExitTransition which can cause the active focus to be lost. If the popup's visibility is tied to that fact then it can retrigger the transition which means the active focus does not go back to where it should. Therefore, we check if hadActiveFocusBeforeExitTransition is false before going through that process as then it will only be called the first time the popup is hidden. Pick-to: 5.15 Fixes: QTBUG-85884 Change-Id: I68054aeb48447617b4235ce6467514a17f1073ba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | Get the scale of the popup item when setting the parent itemAndy Shaw2020-08-172-0/+25
| |/ |/| | | | | | | | | | | | | | | | | | | As there are some styles that will do an transition which animates the scale then we need to size and position based on the final scale it will have to avoid a jump after it has finished the transition. Pick-to: 5.15 Fixes: QTBUG-84488 Change-Id: I4571eb18c921e81de319838ac0e8d3fe3513d438 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: add implicitContentWidthPolicyMitch Curtis2020-07-161-4/+182
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][ComboBox] Added implicitContentWidthPolicy, which controls how the implicitContentWidth of the ComboBox is calculated. This can be used to automatically ensure that text is not elided. Fixes: QTBUG-78281 Change-Id: If669fa4ef05e5da498992843469000ef39c335ec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | ApplicationWindow: remove deprecated overlay APIMitch Curtis2020-06-081-22/+21
|/ | | | | | | | | | [ChangeLog][Controls][ApplicationWindow] The deprecated overlay properties and attached API were removed. Use the Overlay attached type instead. Task-number: QTBUG-84715 Change-Id: I0781ea55ea502ffe5277385e82492291724d2090 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickTextArea: resize background different when inside FlickableRichard Moe Gustavsen2020-06-021-0/+27
| | | | | | | | | | | | When a TextArea is placed inside a Flickable (using the TextArea.flickable property), the background is reparented to the Flickable. For this to look good, the background should have the same size as the Flicable as well, so it doesn't end up with the size of the TextArea, which can be many pages tall. Pick-to: 5.15 Change-Id: I75ead02c712f337c7e743f17aa8810a040519173 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* StackView: fix heap-use-after-free when pushing after clearMitch Curtis2020-05-291-6/+32
| | | | | | | | | | | | | This patch extends the work done in aaec25a7 to cover all operations. Note also that b94889f4 does a similar thing to this patch and aaec25a7, in that it explicitly ignores operations that are done during the removal of elements. Fixes: QTBUG-84381 Pick-to: 5.15 Change-Id: Id8bbbded39d8e58bcf0e8eedeb2dde794952333f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* ComboBox: fix currentValue not being updated on model changesMitch Curtis2020-05-121-0/+49
| | | | | | | | | Make sure we call updateCurrentValue() where necessary. Fixes: QTBUG-83554 Pick-to: 5.15 Change-Id: Iad593c2fc094a26429de1eda91bbdb152ffee2c2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Menu: remove deprecated removeItem(var) overloadMitch Curtis2020-05-111-2/+2
| | | | | | | | | [ChangeLog][Controls][Menu] The deprecated removeItem(var) function was removed. removeItem(Item) or takeItem(int) can be used instead. Change-Id: I79757c22b4f81e1b380798623bd1f15eb09c1647 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove flaky test_openDuringExitTransitionWithTimeout() testMitch Curtis2020-05-111-29/+0
| | | | | | | | | | | | | | This was added in c1420ee5423dfa104d5ff87bc529b4530dc998d6. It has been randomly failing ever since, even after an attempt to stabilise it in 20c35f9a2b5fd970d43efc98c324e1e4c9dd153d. We can live without a test for this if it's going to cause so much trouble. Change-Id: I503bda6703a658feff288905132fce13fd01a74c Fixes: QTBUG-82643 Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Container: remove deprecated removeItem(var) overloadMitch Curtis2020-05-114-26/+20
| | | | | | | | | [ChangeLog][Controls][Container] The deprecated removeItem(var) function was removed. removeItem(Item) or takeItem(int) can be used instead. Change-Id: Ibc693a9216cd039fc11cb4e5182f74a96f493796 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* 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>