aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcombobox.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-061-18/+17
|\ | | | | | | Change-Id: I859406dc779e59ee5d8e2980e04f8be28b1a69aa
| * ComboBox: document the behavior surrounding the accepted() signalMitch Curtis2019-09-061-18/+17
| | | | | | | | | | | | | | | | Change-Id: I65be8e54ded284d2f80b5a1f301b75223bd81bb3 Fixes: QTBUG-75338 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Doc: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | Now that Controls 1 is deprecated, it's ideal to use "Qt Quick Controls" instead of "Qt Quick Controls 2". Task-number: QTBUG-70333 Change-Id: Ie745db4b61071ddb5e06150d4e739cda74c59f41 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QQuickComboBox: emit countChanged signal when model is updatedWang Chuan2019-07-111-0/+1
|/ | | | | | | | | [ChangeLog][QtQuick][QQuickComboBox] countChanged signal now will be emitted when a new model is set to the ComboBox Fixes: QTBUG-75972 Change-Id: Ic26718453ba06ba284ac5903fc6f55ddf3523331 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: fix currentText link, add more \sa linksMitch Curtis2019-05-021-3/+3
| | | | | Change-Id: Ibde952a165c9e0fb40133ce554e90ba35c93feee Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickComboBox: don't hide popup if focusedAlberto Mardegan2019-04-101-5/+5
| | | | | | | | | | | | | The ComboBox popup should be closed when the ComboBox loses focus, but not if the control gaining focus is the popup itself. While all the styles implemented in this module implement the ComboBox popup as an unfocusable window and handle all the keyboard events in QQuickComboBox itself, the developer can choose to replace the popup with a custom implementation, which might need the keyboard focus. Fixes: QTBUG-74661 Change-Id: I838ab9cb697df63ea2099e68f1ae99eadb06be08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickComboBox: ensure we don't close popup on iOSRichard Moe Gustavsen2019-03-211-4/+15
| | | | | | | | | | | | | | | | | | | | On iOS (and Android), we give focus to a control on touch release (rather than on touch begin, which is normal on desktop). For a QQuickCombobox, this means that we will both handle focus and open the popup on touch release, and not focus on touch begin and open popup on touch release, like on desktop. Because of this, we need to be more careful about when we choose to close the popup as well, otherwise it will close down before it gets a chance to show on iOS. This patch will check why we lose focus on both the inner line edit and the combobox itself, and based on this, choose whether we should close the popup. Basically, if focus is just transferred between the popup button and the line edit, we choose to keep the popup open. Fixes: QTBUG-70161 Change-Id: Iec242c0b5570844868085480fdf96fc49d189b82 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickComboBox: update QRegularExpression wildcard codeSamuel Gaist2018-12-171-1/+1
| | | | | | | | | | Following the update of qtbase because of QTBUG-72539, the code using wildcardToRegularExpression must be updated as anchoredPattern is not needed anymore. Task-number: QTBUG-72539 Change-Id: I51c895560866079c9cc27fa076e29fa4546ecf8f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Port QQuickComboBox to QRegularExpressionSamuel Gaist2018-12-041-5/+12
| | | | | | | | This patch updates the QQuickComboBox code to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: I6551fac80b071073e3cd09d2016ef99df510e8ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: rename themeFont() and themePalette()J-P Nurmi2018-05-221-2/+2
| | | | | | | We don't have the conflicting virtual getters anymore. Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-071-46/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickabstractbutton_p_p.h src/quicktemplates2/qquickcombobox.cpp src/quicktemplates2/qquickcontainer.cpp src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickcontrol_p_p.h src/quicktemplates2/qquickdialog_p_p.h src/quicktemplates2/qquickdialogbuttonbox.cpp src/quicktemplates2/qquickdialogbuttonbox_p_p.h src/quicktemplates2/qquickdrawer.cpp src/quicktemplates2/qquickmenubar.cpp src/quicktemplates2/qquickmenubar_p_p.h src/quicktemplates2/qquickpage.cpp src/quicktemplates2/qquickpage_p_p.h src/quicktemplates2/qquickpane.cpp src/quicktemplates2/qquickpane_p_p.h src/quicktemplates2/qquickpopup.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquickrangeslider.cpp src/quicktemplates2/qquickscrollview.cpp src/quicktemplates2/qquickslider.cpp src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquickswipeview.cpp src/quicktemplates2/qquicktabbar.cpp src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p_p.h src/quicktemplates2/qquicktheme_p.h Change-Id: I6e2b8fe99e51e3e26c87546aa66af045bc429ec4
| * Templates: use C++11 default member initializationJ-P Nurmi2018-05-041-46/+19
| | | | | | | | | | | | | | | | | | | | | | The code is more readable and less error-prone (this patch caught a few uninitialized members) when the members are initialized in the same place where they are declared. In many cases, empty default destructors can be entirely removed, and we get faster implicitly declared inline default constructors defined by the compiler. Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Document the default value of ComboBox's currentIndex propertyMitch Curtis2018-05-021-0/+2
| | | | | | | | | | Change-Id: I60dbf84127c800a5f0590ae46c4be3ece7ca3141 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-281-3/+15
|\| | | | | | | Change-Id: I6d731149b21d02164220f6cdc485d9e4ae31bd13
| * ComboBox: don't block the escape/back key (with fixed test)J-P Nurmi2018-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept Key_Escape or Key_Back only if it actually close the popup. If the popup is not visible, the key is not handled, and the event should therefore propagate (and potentially close the app on Android). Note: def92f7 had a broken test (didn't take the popup exit transition into account) and thus, blocked the CI and got rejected in 110b718. Task-number: QTBUG-67684 Change-Id: I46b4731b3006721f3737cf909fbd97331ac6d8ed Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Revert "ComboBox: don't block the escape/back key"Liang Qi2018-04-251-5/+3
| | | | | | | | | | | | | | | | | | | | This change got integrated by sick COIN. This reverts commit def92f7b657ee9247beffffcb0cadd1eca8be3c6. Task-number: QTBUG-67930 Change-Id: I541579d7112ba386b227b7892d4e0aa8e2bd4edf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * ComboBox: don't block the escape/back keyJ-P Nurmi2018-04-231-3/+5
| | | | | | | | | | | | | | | | | | | | Accept Key_Escape or Key_Back only if it actually close the popup. If the popup is not visible, the key is not handled, and the event should therefore propagate (and potentially close the app on Android). Change-Id: Ibdb0cab8e0ac47005c5112f7ca4882288f1f5a17 Task-number: QTBUG-67684 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ComboBox: reset when hiddenJ-P Nurmi2018-04-231-0/+10
| | | | | | | | | | | | | | | | Close the popup and reset the pressed state. Same as in focusOutEvent(). Task-number: QTBUG-67684 Change-Id: I51143175b0f90f3edd116723481faed6ac6e7988 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: add implicitIndicatorWidth|HeightJ-P Nurmi2018-04-181-0/+74
| | | | | | | | | | | | | | | | | | | | Basically same as 704625a0 for AbstractButton. [ChangeLog][Controls][ComboBox] Added implicitIndicatorWidth and implicitIndicatorHeight properties. Change-Id: I1bc9da1ee7ea99dc04ca4458baa06702a4612628 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-03-231-2/+0
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp tests/auto/controls/data/tst_popup.qml Change-Id: I7b7bb5f9c63b32eef65c9b2e68f56baa3da69cff
| * Combo|SpinBox: fix wheel event propagationJ-P Nurmi2018-03-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | Sync the behavior with Qt Widgets. Don't propagate wheel events when reaching the end. The behavior was not nice, that a ScrollView underneath started suddenly moving whilst these input controls had input focus. Task-number: QTBUG-66044 Change-Id: I1b9c7f005652041cd82c77d4a1ca1a01d7d536e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickTheme::ScopeJ-P Nurmi2018-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Replace the old enums that were originally copied from QPlatformTheme, including irrelevant entries for DockWidget, MdiSubWindow, MessageBox, with a unified enum that will be matched to cover everything needed for theming fonts and palettes for Qt Quick Controls 2. Task-number: QTBUG-67062 Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-131-3/+8
|\| | | | | | | Change-Id: I32562a4aa6ca3090b28f624d675024f6b717bedb
| * ComboBox: fix key search in the popupJ-P Nurmi2018-03-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ComboBox does not change its current index, but highlighted index, when navigating in the popup. If the popup is accepted, the currently highlighted index is applied as the new current index. However, if the popup is rejected, the old current index is kept intact. This is why there is a separation between current and highlighted index. The newly added key search functionality (added together with ComboBox::editable) was missing a check whether the popup is visible. It was unconditionally changing the current index, which lead to a wrong behavior when the popup was open. Task-number: QTBUG-61348 Change-Id: Ic0295db609495ccefbccb7c425a817926786014e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-101-1/+2
|\| | | | | | | Change-Id: Id5cd236e14238612647f7a897886be0202863132
| * Doc: add a "Focus Management in Qt Quick Controls 2" pageMitch Curtis2018-03-061-1/+2
| | | | | | | | | | | | | | | | This will list each control that is a focus scope, and have some relevant information about focus in Qt Quick Controls 2. Change-Id: I3126452bf73f7d7730d0522d616d61ad0da0dd74 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Move QQuickControlPrivate::themeFont|Palette() to QQuickThemeJ-P Nurmi2018-02-151-2/+2
|/ | | | | | | | | | | | | | QPlatformTheme is too limited for our theming purposes. We need support for separate palettes (and later, icon colors) in dark and light themes. Also, the fact that Qt Quick Controls 2 injects a platform proxy theme does have undesired side effects in Qt Widgets and Qt Quick Controls 1. Therefore, we start separating QPlatformTheme and QQuickTheme. The first step is to eliminate some direct QPlatformTheme access in QQuickControl and route it via QQuickTheme instead. Task-number: QTBUG-51921 Change-Id: I055471a75ed6f26968796496efd1892975447c98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-311-1/+1
|\ | | | | | | Change-Id: I697f98d5214f487c915032d744ec593da05368a8
| * QQuickComboBox: fix popup's deferred executionJ-P Nurmi2018-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike other delegates, such as background and contentItem, popup is not unconditionally executed upon component completion. For performance reasons, its execution is delayed until the popup is needed, that is, the popup is accessed or shown. When the popup is accessed, we use the current completion status via isComponentComplete() to determine whether its execution must be completed immediately, or if we can wait until componentComplete(). However, if the popup was accessed while the combobox itself was being completed (used in ComboBox's bindings), the popup was never completed because isComponentComplete() was still returning false even though the popup was actually being indirectly accessed from componentComplete(). A simple execution order change, to complete the combobox itself before the popup, fixes the problem. Task-number: QTBUG-65962 Change-Id: I4764eb7e273e7f6fa1dab1a65a02b87722ee7cba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-101-2/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/BusyIndicator.qml src/imports/controls/CheckBox.qml src/imports/controls/CheckDelegate.qml src/imports/controls/ComboBox.qml src/imports/controls/DelayButton.qml src/imports/controls/Dial.qml src/imports/controls/ItemDelegate.qml src/imports/controls/MenuItem.qml src/imports/controls/RadioButton.qml src/imports/controls/RadioDelegate.qml src/imports/controls/SwipeDelegate.qml src/imports/controls/Switch.qml src/imports/controls/SwitchDelegate.qml src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc src/imports/controls/material/CheckDelegate.qml src/imports/controls/material/ItemDelegate.qml src/imports/controls/material/MenuItem.qml src/imports/controls/material/RadioDelegate.qml src/imports/controls/material/SwipeDelegate.qml src/imports/controls/material/SwitchDelegate.qml src/imports/controls/qquickdefaultbusyindicator.cpp src/imports/controls/qquickdefaultbusyindicator_p.h src/imports/controls/qtquickcontrols2plugin.cpp src/imports/controls/universal/CheckDelegate.qml src/imports/controls/universal/ItemDelegate.qml src/imports/controls/universal/MenuItem.qml src/imports/controls/universal/RadioDelegate.qml src/imports/controls/universal/SwipeDelegate.qml src/imports/controls/universal/SwitchDelegate.qml src/quickcontrols2/quickcontrols2.pri src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickmenu.cpp src/quicktemplates2/qquickpopup_p.h Change-Id: Ib25c8b4a7fe018b7c0ade9b02bfaaa6980118c15
| * Fix deferred executionJ-P Nurmi2017-12-211-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the QML engine refuses to defer execution of a delegate (it contains an ID), we must make sure to cancel any pending deferred execution for the same delegate. Otherwise, we may end up overriding a custom (non- deferred) delegate with a default (deferred) delegate. This patch adds a new test style "identified" to tst_customization. This style contains delegates with IDs so we can test the behavior with IDs in base styles. Furthermore, overriding delegates is now tested in various ways (with and without IDs in the base and custom styles) in a separate test method. This is done by generating QML code to override delegates with dummy Item instances with appropriate IDs and names. Task-number: QTBUG-65341 Change-Id: Ie6dca287cb74672004d9d8f599760b9d32c3a380 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-12-151-27/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/quickcontrols2/quickcontrols2.pro src/imports/controls/ComboBox.qml src/quicktemplates2/qquickabstractbutton.cpp src/quicktemplates2/qquickabstractbutton_p.h src/quicktemplates2/qquickapplicationwindow_p.h src/quicktemplates2/qquickcombobox.cpp src/quicktemplates2/qquickcontainer.cpp src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickcontrol_p.h src/quicktemplates2/qquickcontrol_p_p.h src/quicktemplates2/qquicklabel_p.h src/quicktemplates2/qquicklabel_p_p.h src/quicktemplates2/qquickslider_p.h src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquicktextarea_p.h src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p.h src/quicktemplates2/qquicktextfield_p_p.h tests/auto/auto.pro tests/auto/controls/data/tst_combobox.qml Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
| * Control: defer the execution of the content itemJ-P Nurmi2017-12-151-10/+0
| | | | | | | | | | | | | | | | | | Tumbler is excluded because test_customContentItemAtConstruction() starts failing if deferred execution is enabled for the content item. Task-number: QTBUG-50992 Change-Id: I11022c3c380311396453cf6229e068e4aae2d82a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Control: defer the execution of the background itemJ-P Nurmi2017-12-151-1/+0
| | | | | | | | | | | | Task-number: QTBUG-50992 Change-Id: I6372e143c68f0a5bf7212d759281acef3c81618e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ComboBox: use deferred executionJ-P Nurmi2017-12-141-26/+80
| | | | | | | | | | | | | | | | | | | | | | | | As a special case, ComboBox defers the execution of the popup until the popup is either accessed or made visible. This gives a nice boost in creation time benchmarks (20->25, ~25%). The old optimization of setting the delegate model only when the popup is visible is no longer needed. Task-number: QTBUG-50992 Change-Id: Ifeaceb759ab676bb54c6bc09dc97810eade72ca1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-11-061-146/+148
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickabstractbutton_p.h src/quicktemplates2/qquickbuttongroup_p.h src/quicktemplates2/qquickrangeslider.cpp src/quicktemplates2/qquickrangeslider_p.h src/quicktemplates2/qquickswipeview_p.h src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextarea_p.h src/quicktemplates2/qquicktextfield_p.h Change-Id: I7cba8783b1dd85a4db534222e36572ee05dd01d0
| * Re-order all revisioned members and add explanatory commentsJ-P Nurmi2017-11-061-146/+148
| | | | | | | | | | | | | | | | | | | | We've come to realize that even though it's tempting to group similar properties together, organizing the API so that revisions are grouped together makes future maintenance more pleasant. It's a lot easier to to see what was added and when. Change-Id: I47ba7725260f2c259048848cc2a9b17bce2f01c7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickComboBox: fix attached Keys signal handlers when editableJ-P Nurmi2017-09-111-2/+5
| | | | | | | | | | | | Task-number: QTBUG-61135 Change-Id: I3f00cb81eeacbbddecc04d206bf13e602de15af7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-06-151-0/+4
|\| | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/ButtonGroup.qml tests/auto/controls/data/tst_container.qml tests/auto/menu/tst_menu.cpp Change-Id: Ie8ee7e4f83f3fda6a09507b060576ebda929a7cd
| * ComboBox: fix QObject list value modelsJ-P Nurmi2017-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When ComboBox::model is bound to a QObjectList property, the effective type of the model is QVariant(QQmlListReference) and things work as expected. When a similar QObjectList is constructed by hand in JS, or returned from an invokable method, the effective type of the model is QVariantList(QObjectStar) instead. In this scenario, we have to help QQuickComboBoxDelegateModel::stringValue() to lookup the property that matches the given textRole. Change-Id: Ib44c912cf647e1cd98c5608436427d31caf80d97 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-06-061-1/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | Fusion style ComboBox popup height was adjusted according to 90a0d402 to make tst_controls::ComboBox::test_emptyPopupAfterModelCleared pass with the Fusion style. Conflicts: src/imports/controls/ComboBox.qml src/imports/controls/material/ComboBox.qml src/imports/controls/universal/ComboBox.qml Change-Id: I2bad826dc56de9d8952ea2a9ace950c7cf3cbc58
| * Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-311-1/+9
| |\ | | | | | | | | | Change-Id: Iba044084bf82f6b2b8ceba4aa2a80bdcf8fc38e0
| | * QQuickComboBox: fix crash on popup destructionv5.9.0-rc2v5.9.0-rc1v5.9.0J-P Nurmi2017-05-191-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f19e2d5f changed the QQuickComboBox destructor to call setPopup(null) instead of deleting the popup directly. The reason for this change was that setPopup() did not only destroy the popup but also disconnected the visibleChanged() signal to avoid spurious highlightedIndexChanged() signal emission during ComboBox destruction. There was an undesired side-effect with this change: it ended up calling destroyDelegate() during destruction, potentially accessing a destroyed QML context. Switch back to the old way, and disconnect visibleChanged() in place instead. Task-number: QTBUG-57650 Task-number: QTBUG-50992 Change-Id: I49d96710815dfc163e75a7ff82fe0e4742cfbb59 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devJ-P Nurmi2017-05-301-10/+10
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickrangeslider.cpp Change-Id: I7eb990cfdc91173f86552841ba16536b35ea09cf
| * | Doc: add the Qt version to "\since QtQuick.Controls 2.x"J-P Nurmi2017-05-301-10/+10
| | | | | | | | | | | | | | | Change-Id: Ia7f237cb580bf9c332ff4741569a57fef4eb6079 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | QQuickComboBox: update highlighted index on mouse hoverJ-P Nurmi2017-05-301-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the expected behavior on desktop. NOTE: We can no longer rely on ListView.ApplyRange, because if ListView adjusts the content position while key navigating or scrolling, "wrong" items may get hovered and the highlighted index gets set incorrectly leading to a hovered->highlight->hovered loop. Therefore we force ListView.NoHighlightRange to keep existing styles working without modifications. Change-Id: I57fe3de1230dd6348d01c1785cd09d4fb184d28a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Implement defaultPalette()J-P Nurmi2017-05-261-0/+5
|/ / | | | | | | | | Change-Id: I4345f6a3b61476287b6161d89b752735757f3a7e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* / QQuickComboBox: set "editable" accessible propertyJ-P Nurmi2017-05-221-1/+4
|/ | | | | | Change-Id: I6db93b5bbf46a8356ebb03f4e9c814cd00642026 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Override QQuickControlPrivate::handleXxx()J-P Nurmi2017-04-201-92/+10
| | | | | | Change-Id: I5c5be24142a758637e18df24b43847a8c6079346 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQuickControl: implement focus handling on touchJ-P Nurmi2017-04-201-5/+2
| | | | | | | | | | | | | | | | | | | | QQuickControl::focusPolicy was only managed in mousePressEvent() and mouseReleaseEvent(). All controls call the base class implementations of these event handlers to get the focus policy handling "for free". Move focus policy handling to handlePress() and handleRelease() that can be re-used for touch events, and make sure that various controls call the base class implementation of touch event handlers. There's still a bit of duplication in QQuickControl::touchEvent() and the overridden handlers in sub-classes, but this will be improved step by step. QQuickControlPrivate::handlePress/Move/Release/Ungrab() are planned to be made virtual, overridden in subclasses, and only called from QQuickControl event handlers. Most mouse and touch event handlers in QQuickControl subclasses can be removed later when we get there. Task-number: QTBUG-58389 Change-Id: I7e82dc2ef49762a005c482ce1353e03cc841659f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>