aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontrol.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix event refactoring warnings and errorsMitch Curtis2020-08-111-14/+14
| | | | | Change-Id: I426b4f75066c9db72759398e4d76fd5323044d57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-301-5/+5
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I92ef02ede041d3965151165a479a1ea0549cc0f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix -no-accessibility buildPeter Varga2020-05-111-0/+2
| | | | | | Change-Id: Icbae79fd0f48fb9351ee8cc12b35ead7e99b09e2 Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Adapt to geometryChanged => geometryChange renamingMitch Curtis2020-04-241-2/+2
| | | | | | Task-number: QTBUG-82994 Change-Id: Iaf530d2a6f4dc92641d0c10e16e7b931f90646ac Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove old QQuickPalette implementationVitaly Fanaskov2020-03-181-174/+6
| | | | | | | | | | | | | | The existing implementation was removed in order to reduce massive code duplication and simplify color resolving process. Unit tests were fixed accordingly. See related changes in the qtdeclarative module for the further details. [ChangeLog][General] the palette API is a part of QQuickItem now. Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-151-0/+12
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: Id3bca2da290234f3c69845ffe18c6d9193a1bd28
| * Account for when a touch event is synthesized by Qt as a mouse eventAndy Shaw2020-02-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a control is on a Flickable with a pressDelay then any press events sent from a touch device will be replayed as mouse events due to the delay. As a result we cannot depend on the fact that we got the first press as a touch event when checking if the id matches before accepting it. So we need to keep the previous pos when it is a synthesized mouse event so we can ensure the release is also accepted. Fixes: QTBUG-77202 Change-Id: I6f5d8506bd803daf834093e8fd412504150c4ca6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-301-3/+5
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_combobox.qml Change-Id: I8471cdac4397f77a8e58140d58c6b50d3c437928
| * Respect user-set Accessible.nameMitch Curtis2019-12-031-3/+5
| | | | | | | | | | | | | | | | | | Check if the user has set Accessible.name before setting it to the control's text/title/etc. Fixes: QTBUG-66583 Change-Id: I8b2c8ab3f8a8ae8e76c8e6a241260b7f90eca254 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-301-3/+5
|\| | | | | | | Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
| * Doc: Fix qdoc warningsVenugopal Shivashankar2019-11-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | The warnings were about: - Undocumented function parameters - Instances of \instantiates that us an internal class - A few link issues Task-number: QTBUG-79827 Change-Id: I60094279c7da6bc446b5c63b7b4924b71cee4672 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Don't delete items we didn't createMitch Curtis2019-11-281-2/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Unset the resolved font's families if it was not set beforeAndy Shaw2019-11-081-1/+7
| | | | | | | | | | | | When the font is resolved, if the font does not have families set then it will set it to be the family to ensure that it has the right precedence. Therefore we need to reset the families setting so that it does not act like a font has changed after being resolved when it really hasn't. Fixes: QTBUG-79790 Change-Id: I03c6f1456dbe5f136181b1c3a0e22fdc0fa66679 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-221-2/+2
| | | | | | | | | 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>
* Doc: bindings to x/y/width/height of contentItem aren't respectedMitch Curtis2019-05-031-2/+3
| | | | | | Change-Id: Idecee26bcae178ed294c062819f55e12a65af37d Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: ensure that "palette" is reevaluated when enabled state changesMitch Curtis2019-02-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When changing the enabled state of a Menu after component completion, the background would not change. The problem was that QQuickPopup::paletteChanged() was not being emitted when the enabled state changed, resulting in QQuickControl::palette() (which QQuickPopup::palette() forwards calls to via its popupItem) not being called. QQuickControl::palette() changes the palette's current color group to QPalette::Disabled when it is disabled, so if it's not called, the popup's colors won't change. Fix the issue by adding a virtual enabledChange() function to QQuickControl, which QQuickPopupItem can override to emit both QQuickPopup::enabledChanged() (saving a connection in the process) and QQuickPopup::paletteChanged(). This ensures that bindings to QQuickPopup::palette are re-evaluated. The patch adds a virtual instead of just emitting paletteChanged() in QQuickPopup::setEnabled(), because we also want to be notified of indirect enabled state changes, such as those coming from parent items. Change-Id: Ibdbd05f27b5a74fe731bda9d6698cbf6b8f81785 Fixes: QTBUG-73447 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: clarify event handlingMitch Curtis2018-12-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | The current documentation says: "All controls, except non-interactive indicators, do not let clicks and touches through to items below them. For example, if Pane is used as the header or footer of ApplicationWindow, items underneath it will not get mouse or touch events." This can be confusing, because a Pane declared as a child of a MouseArea is "below" the MouseArea in code, but is "above" the MouseArea in the scene. Add a code example to make it less ambiguous. Also, link to the Event Handling section from Pane's docs. Task-number: QTBUG-71735 Change-Id: I97f4d6501af410bd5d5c0c0e48b14ca65605357d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix compilation with gcc 4.8Ville Voutilainen2018-12-031-1/+1
| | | | | | | GCC 4.8 doesn't like using QPointer in signal connections. Change-Id: Idc61984b155b0af8d1afb9d43c9eaf44ca9073cd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-281-0/+20
|\ | | | | | | Change-Id: Icd5d8a4292be3a335000a7bd0f30384ad83ff36d
| * Doc: add a note about the best way to set paddingMitch Curtis2018-07-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | As the styles are subject to change over time, it's best to use the most fine-grained properties for specifying padding (topPadding, bottomPadding, etc.). Using these specific properties will ensure that what the user specifies always wins over what the style specifies. Task-number: QTBUG-69551 Change-Id: I4163e9918010fad0cb6ec701b49dbc59b086cf47 Reviewed-by: J-P Nurmi <jpnurmi@gmail.com>
* | QQuickControl: only set hasBackgroundWidth/Height when necessaryMitch Curtis2018-06-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following binding in the Fusion style's TabButton.qml implementation causes the last tab's background not to cover its full width: height: control.height - (control.checked ? 0 : 2) It seems that this line is executed upon the completion of deferred execution of the background, which somehow results in the early return check in itemGeometryChanged() not being executed. After that, there are these two lines: extra.value().hasBackgroundWidth = p->widthValid; extra.value().hasBackgroundHeight = p->heightValid; Even though this was just a change in height, hasBackgroundWidth was set to true early on (when the width was 8; the combined left and right padding), preventing the control from setting a width on the background in the future. This patch fixes the issue by only setting hasBackgroundWidth if the width was changed, and only setting hasBackgroundHeight if the height was changed. Task-number: QTBUG-68556 Change-Id: I4c7dbc60d8e73c60c025e5d6c65f3917e6e4ea08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QQuickTheme: rename themeFont() and themePalette()J-P Nurmi2018-05-221-4/+4
| | | | | | | | | | | | | | 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-43/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-25/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Add missing implicitBackground{Width|Height} to non-QQuickControlsJ-P Nurmi2018-05-021-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as 5bd9d44b for QQuickControl. [ChangeLog][Controls][Label] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. [ChangeLog][Controls][TextArea] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. [ChangeLog][Controls][TextField] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. Change-Id: Idcc2d9af8df086b41c15f352506fd8afdbb2e3e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: fix background sizeJ-P Nurmi2018-04-231-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | Don't reset QQuickItemPrivate::widthValid and heightValid flags, because that will cause the item to update its geometry when its implicit size changes. Instead, keep track whether background has an explicit size at the time of assignment, or if the background changes its geometry outside of resizeBackground(). Task-number: QTBUG-66455 Change-Id: If14eeae6863f7e5e47ebf2d6dbdaf718fc8368d4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: add support for background insetsJ-P Nurmi2018-04-231-20/+229
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Control] Added topInset, bottomInset, leftInset, and rightInset properties to control the geometry of the background similarly to how paddings control the geometry of the contentItem. Task-number: QTBUG-60156 Change-Id: Id8228d32f6a5fffeb771964a153ee062a5a083b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: add implicitContentWidth|Height propertiesJ-P Nurmi2018-04-131-3/+131
| | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Control] Added implicitContentWidth and implicitContentHeight properties that can be used to simplify complex implicit size bindings. Change-Id: I6ccef572c013605058808ce2ad17f8bd82f49ef0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: add implicitBackgroundWidth|Height propertiesJ-P Nurmi2018-04-121-0/+95
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Control] Added implicitBackgroundWidth and implicitBackgroundHeight properties that can be used to simplify complex implicit size bindings. Task-number: QTBUG-60156 Change-Id: Ia68df187c2a458c84de19f867d76a643134e8b69 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickControl: update baseline offset automaticallyJ-P Nurmi2018-04-041-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | ...unless explicitly defined. All buttons repeated the same binding. [ChangeLog][Controls][Control] Unless explicitly specified, baselineOffset is now automatically updated based on the top padding of the control and the baselineOffset of the contentItem. Styles no longer need to specify the baselineOffset in QML. Change-Id: I9c6f61371fee05a06b5dd31b27d8baf9da0bdeeb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix QQuickControl::contentItemChange()J-P Nurmi2018-03-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other similar change() virtuals, such as fontChange(), localeChange() and paletteChange(), are called _after_ the value has been applied. The old value is passed as an argument. Use the same order for contentItem. This allows calling such methods from contentItemChange(), that rely on d->contentItem being set. If d->contentItem points to the old content item, all methods need to take the new item as an argument, which gets ugly especially if the same methods are used from elsewhere too. This is very well visible in QQuickPanePrivate: - bool updateContentWidth(QQuickItem *item); - bool updateContentHeight(QQuickItem *item); - void updateContentSize(QQuickItem *item); These are called with "newItem" from contentItemChange(), and with "d->contentItem" from many other places. Note: if a pre-notifications were required for something in the future, it would be probably better to add "aboutToChange" counterparts. Change-Id: I67dfdcce0e5f1cd9d9a37a63a0a9fdeaf82eafe6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickTheme::ScopeJ-P Nurmi2018-03-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Move QQuickControlPrivate::themeFont|Palette() to QQuickThemeJ-P Nurmi2018-02-151-35/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.11' into devJ-P Nurmi2018-02-151-3/+11
|\| | | | | | | Change-Id: Id3333e9bb67ced4c6dbae5845512fe1927a7b858
| * Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-3/+11
| |\ | | | | | | | | | Change-Id: I2934d3f51fea9626fd2d2512786eb297d9f7fe6c
| | * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-091-3/+11
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia407f277cccfdd96242ebfdbe294d699e26e6b1d
| | | * QQuickControl: respect wheel focus policy for focus scopesJ-P Nurmi2018-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][Control] Fixed focus scope controls to respect wheel focus policy. Task-number: QTBUG-66133 Change-Id: If963feba4b6e59b87ca54af5f6606805093eb0cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | | * QQuickControl: respect click focus policy for focus scopesJ-P Nurmi2018-02-051-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a focus scope explicitly requests click focus, make it gain active focus by clearing the sub-focus child. Pane { focusPolicy: Qt.ClickFocus TextField { } } [ChangeLog][Controls][Control] Fixed focus scope controls, such as Frame, GroupBox, Page, and Pane, to respect click focus policy by clearing a potential sub-focus child. This makes it possible to close the virtual keyboard by clicking the background of a Pane that has Qt.ClickFocus set as its focusPolicy, for example. Task-number: QTBUG-66133 Change-Id: I582f3c66aa6f11e229d89c4f610fae3c6259104d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | Add Control::horizontal|verticalPaddingJ-P Nurmi2018-02-131-54/+155
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common pattern for paddings: padding: X topPadding: Y bottomPadding: Y This pattern can be simplified by providing separate horizontalPadding and verticalPadding properties: padding: X horizontalPadding: Y The actual style changes will be applied separately. As a bonus, the size of QQuickControlPrivate can be reduced a bit since we can move the (has)top/left/right/bottomPadding members to ExtraData. [ChangeLog][Controls][Control] Added horizontalPadding and verticalPadding properties as a convenient way to set both left and right, or top and bottom paddings in one go. Change-Id: I3a93b6f9ab988d806b1f263e74b6bd6b5427fbbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into 5.11J-P Nurmi2018-01-311-0/+1
|\| | | | | | | | | | | Change-Id: I7c0333dbf959124f6cf5be7837a305b65c08d290
| * | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-311-0/+1
| |\| | | | | | | | | | Change-Id: I697f98d5214f487c915032d744ec593da05368a8
| | * Control: fix background size regression caused by deferred executionJ-P Nurmi2018-01-221-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-65880 Change-Id: Ic4f9fb087f4a78bd4c6257828011240186b6b22e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devJ-P Nurmi2018-01-161-25/+20
|\| | | | | | | | | | | Change-Id: Ibd1490e8d958361e55ac272dff75c9361239958b
| * | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-151-23/+0
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickcontrol.cpp tests/auto/sanity/tst_sanity.cpp Change-Id: I62a79fd7788fec635b9917fc91bacd7338b547fd
| | * Remove unused QQuickControlPrivate::destroyDelegate()J-P Nurmi2018-01-111-23/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-65341 Change-Id: Ib64ec7ede42c140483554cf75e9bc16aa147be6c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2018-01-101-2/+20
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.10' into devLiang Qi2018-01-091-11/+62
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quicktemplates2/qquickabstractbutton_p.h Change-Id: I265cbd2ce51beaf2afef99292c2e2798dadb4ba3
| * | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-12-151-5/+41
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>