aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * ComboBox: don't block the escape/back keyJ-P Nurmi2018-04-231-0/+71
| | | | | | | | | | | | | | | | | | | | 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/+6
| | | | | | | | | | | | | | | | 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>
| * Popup::test_shortcut(): use "A" instead of "Tab" for shortcutMitch Curtis2018-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | The recently merged stabilization patch showed that the shortcut isn't delivered, and the logs show some focus stuff going on before it fails. If the flakiness is related to focus handling as a result of the tab press, we can try a different key. Change-Id: I6094f11de9d938fd18ad5af8b39b0a1489443638 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | DialogButtonBox: fix layout regressionJ-P Nurmi2018-04-241-0/+27
| | | | | | | | | | | | | | In testbench, the settings dialog buttons were wrong laid out. Change-Id: I3d62d5cc9d6c21a15df70a392e9b1a9d762ff3c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: fix background sizeJ-P Nurmi2018-04-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-0/+146
| | | | | | | | | | | | | | | | | | | | [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>
* | Tumbler: follow the "standard" implicit size calculation practicesJ-P Nurmi2018-04-191-2/+2
| | | | | | | | | | Change-Id: I94885e777a9c24cbde856f10e9dd258d8a72e9e1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-04-181-2/+5
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/Page.qml src/imports/controls/fusion/Page.qml src/imports/controls/imagine/Page.qml src/imports/controls/material/Page.qml src/imports/controls/universal/Page.qml Change-Id: I5acf99d0d2009151d6daff9420d79cb06909c873
| * Page: fix implicitWidth bindingsJ-P Nurmi2018-04-171-2/+5
| | | | | | | | | | | | | | | | Don't add paddings to header and footer width when choosing the max. Padding affects content, not headers and footers. Change-Id: I92381762f97eab384b18510522bf788abecd8338 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-142-0/+32
|\| | | | | | | Change-Id: Ia5d3c9705e5832df76bb55753dcf38e340afc5b2
| * Stabilize Popup::test_shortcut()Mitch Curtis2018-04-091-0/+8
| | | | | | | | | | | | | | | | Try to pinpoint the cause of recent flakiness by ensuring that the shortcut is activated. Change-Id: I8bf81dedfd28b0fe66403147228a8452cc3bea2a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickLabel: fix background resizingJ-P Nurmi2018-04-091-0/+24
| | | | | | | | | | | | | | | | setBackground() must resize the item if component construction is already complete. Change-Id: I76cada5b37257473a9c0146ee1f6de8de6c10218 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: add implicitContentWidth|Height propertiesJ-P Nurmi2018-04-137-8/+105
| | | | | | | | | | | | | | | | | | [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>
* | Tests: fix QQuickVisualTestUtil::addTestRowForEachControl()J-P Nurmi2018-04-121-1/+4
| | | | | | | | | | | | | | | | | | Since fe7d1b89, the Default style is unconditionally available in resources. This made tst_objectcount fail, because it was calling QUrl::fromLocalFile() for a file path in resources. Change-Id: I99ccdea7f7bad65620fcf41c0554e7fdd8677611 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tests: move duplicated addTestRows() to QQuickVisualTestUtilJ-P Nurmi2018-04-129-127/+70
| | | | | | | | | | Change-Id: I723f1fe2e5df1ea4a09bd7e567079cdbc7124e6e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Control: add implicitBackgroundWidth|Height propertiesJ-P Nurmi2018-04-121-8/+36
| | | | | | | | | | | | | | | | | | | | [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>
* | SwipeView: add contentWidth and contentHeightJ-P Nurmi2018-04-101-7/+24
| | | | | | | | | | | | | | | | [ChangeLog][Controls][SwipeView] Added contentWidth and contentHeight properties. Change-Id: I9c37583cb5fcfb1af2d98d5d3753277e17e82608 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-04-061-0/+3
|\| | | | | | | Change-Id: I509cd2e02874d9a2fe0febf8cc667833b7072b23
| * TextArea: fix background parentJ-P Nurmi2018-04-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextAreaPrivate::attachFlickable() reparents the background from Flickable::contentItem to the Flickable itself. This avoids that the background scrolls together with the content. However, when deferred execution was enabled, attachFlickable() ended up being called before the background had been executed. If the TextArea has already been attached to a Flickable when the background gets exeuted, set the appropriate parent in setBackground(). Task-number: QTBUG-67334 Change-Id: I0847fca5861fdddeac7d47d47316b74bb31500cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | RangeSlider: add valueAt() functionMitch Curtis2018-04-051-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary to e.g. show up-to-date values in tooltips for each handle when live is set to false. It's copied from Slider. [ChangeLog][Controls][RangeSlider] Added a valueAt() function to allow accessing each handle's value when the live property is set to false. Task-number: QTBUG-67317 Change-Id: I8d0ca1a914f983b6b950ece759a102c05c5dd2f0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | RangeSlider: add first.moved() and second.moved() signalsMitch Curtis2018-04-051-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary to respond to changes in values, as the documentation currently advises using onValuedChanged, which can result in binding loop errors and is generally not the right way to respond to input changes. [ChangeLog][Controls][RangeSlider] Added a moved() signal to each handle (similar to the Slider's moved() signal) to react to the values being interactively changed by the user. Task-number: QTBUG-67311 Change-Id: I4a026042855c69f22755415031bac8833cd566a9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickControl: update baseline offset automaticallyJ-P Nurmi2018-04-041-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | ...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>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-03-235-5/+83
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp tests/auto/controls/data/tst_popup.qml Change-Id: I7b7bb5f9c63b32eef65c9b2e68f56baa3da69cff
| * tst_customization: only track objectNames we're interested inMitch Curtis2018-03-231-1/+3
| | | | | | | | | | Change-Id: I496a6a60383c0332ec52e9349892c8923ed42c76 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Combo|SpinBox: fix wheel event propagationJ-P Nurmi2018-03-232-4/+30
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix Shortcuts in Popups with window context not being activatedMitch Curtis2018-03-221-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, this code wouldn't work: Popup { id: popup Shortcut { sequence: "Tab" onActivated: popup.visible = !popup.visible } } Even though Popup is aware of its Window, the Shortcut object is parented to Popup::contentItem, which does not have a Window associated with it while the Popup is hidden. The fix is to check if the item has a window in QQuickShortcutContext::matcher(), so that that check fails and the QQuickPopup itself is used to access the window. Change-Id: Ia1c5d75ad6b82fb4c8b7664b6d418d84428b1ddf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Fix crash with StackView::initialItemSimon Hausmann2018-03-211-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following binding initialView: Qt.createComponent("blah.qml") works with QQC1 but crashes with QQC2 as soon as the garbage collector kicks in. In QQC1 StackView was implemented in a .qml file and the property was declared as property var initialItem For such declared properties the QML engine takes care of ensuring that the reference assigned is a strong reference towards the GC and it also tracks the life-time of the QObject in case it's explicitly deleted by somebody else. In QQC2 the property continues to be documented as "var" property, however it is implemented in C++ as QVariant property. The QVariant is not known to the GC at all and it also doesn't do life-cycle tracking. The C++ equivalent to "var" in QML is QJSValue, which is a strong reference and also ends up using a QPointer internally when holding a QObject. Task-number: QTBUG-67118 Change-Id: I43e473c7bf2c40f9843e9d50fe4fd805b54fd256 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPane: fix a regression in implicit size calculationJ-P Nurmi2018-03-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caused by 87dec64. Previously, the bindings were: contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) That is, if contentItem does not have implicit size, Pane uses the implicit size of the first content child (if there's one). When the new automatic content size calculation was implemented, I forgot to install a listener on the content child (in addition to contentItem). Consequently, if the imlicit size of the first content child changed after construction, the content size was not updated as appropriate. Change-Id: Ib3d81f4e08a4d0822849d5db12429a2dd036e206 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add anchors property to Popup to allow centering in parent/windowMitch Curtis2018-03-221-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, users must manually position their Popup using x and y bindings: Popup { x: (parent.width - width) / 2 y: (parent.height - height) / 2 } This patch adds an anchors property so that you can do this instead: Popup { anchors.centerIn: parent } It's also possible to conveniently center within the window from anywhere within the scene (106e7b63 also documents an alternative way of doing this using Overlay): Window { id: window Pane { Popup { anchors.centerIn: window } } } QQuickAnchors were never used with Popup, because we cannot use the QQuickAnchors implementation as-is, as the visual QQuickItem parent is not the actual parent item of QQuickPopupItem. Currently just centerIn is supported, as that's the most common use case. [ChangeLog][Controls][Popup] Added anchors.centerIn to Popup to allow a covenient way of centering a popup. Task-number: QTBUG-60354 Change-Id: Ia030f812df9da646fea8f373ef6199a21205ffbd Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickStyle: add API for managing style pathsJ-P Nurmi2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to use/refer to/select styles by name: - ./myapp -style Glossy - :/qtquickcontrols2.conf: [Controls] Style=Glossy - QT_QUICK_CONTROLS_STYLE=Glossy ./myapp the style needs to be available in a place where QQC2 can find it by the given name. Normally, QQC2 scans for available styles in the QT_INSTALL_QML/QtQuick/Controls.2/ directory, where all the built-in styles reside. However, 3rd party styles may want to install styles into their own namespace, especially if they offer style-specific API. If a style is installed elsewhere, QQC2 needs to be made aware of the style path to make it possible to locate the style. Previously, the QT_QUICK_CONTROLS_STYLE_PATH environment variable was the only way. This adds proper C++ API, inspired by QQmlEngine's importPathList and pluginPathList, to manage QQC2 style paths. [ChangeLog][Controls][QQuickStyle] Added stylePathList() and addStylePath() methods for managing the list of directories where Qt Quick Controls 2 searches for available styles. Task-number: QTBUG-67062 Change-Id: I1e85b5e09ba869483c0937ac61a0a2dcfc8e774e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickTheme::ScopeJ-P Nurmi2018-03-153-111/+115
| | | | | | | | | | | | | | | | | | | | | | 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>
* | QQuickTheme: cleanup the APIJ-P Nurmi2018-03-153-3/+3
| | | | | | | | | | | | Task-number: QTBUG-67062 Change-Id: Id2f821bd41b72f7bce9885295e89c322eb3332f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTheme: add missing fonts and palettesJ-P Nurmi2018-03-152-6/+6
| | | | | | | | | | | | | | | | | | SpinBox, Switch, and Tumbler were previously not available in QPlatformTheme, but now we have our own enums so we can add them. Task-number: QTBUG-67062 Change-Id: Ie99a49b464fbbd25051181b75d721f537b8e3a68 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_slider.qml: add release of touchEventSequenceYulong Bai2018-03-141-0/+2
| | | | | | | | | | | | | | | | Add release of touchEventSequence in test_touchDragThreshold to avoid possible it is reused by other test cases. Change-Id: Ie0c8a53ede5d65effc1ee501d4428179f28d6734 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | QQuickRangeSlider: add touchDragThreshold propertyYulong Bai2018-03-141-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add touchDragThreshold property for configuring the threshold to initiate a 'drag', i.e. touch move, of the handle of the slider. The mouse 'drag' won't be affected by the property. This property may be also used to configure the drag events stealing priorities of nested draggable items in the future. [ChangeLog][RangeSlider] Added touchDragThreshold property for configuring the threshold to initiate the touch 'drag' of the handle of the slider. The mouse 'drag' won't be affected by the property. Task-number: QTBUG-62784 Change-Id: I5555deb827de9d1dc7be00970fba15001105e419 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Sync tst_palette::defaultPalette() with tst_font::defaultFont()J-P Nurmi2018-03-141-50/+6
| | | | | | | | | | | | | | Iterate and fill the whole test palette array. Change-Id: Ibaf2365fc7c0d10dbea0747ae3351e3523869da3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Refactor QQuickStyleSelectorJ-P Nurmi2018-03-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of trying to determine a single base URL based on the import URI of the plugin, and whether built in static mode, provide a list of paths where to lookup styles, in priority order: - requested style path (-style /path/to/style) - QT_QUICK_CONTROLS_STYLE_PATH environment variable - QT_INSTALL_QML/QtQuick/Controls.2/ - qrc://qt-project.org/imports/QtQuick/Controls.2/ Furthermore, provide the requested style name and the fallback style name as a simple list of selectors. The lookup order is: 1) requested style 2) fallback style 3) default style As a result, QQuickStyleSelector implementation is a lot simpler, completely independent of QQuickStyle, and the style lookup works regardless of whether the files are in QRC or on the file system. This allows us to utilize QRC and the Qt Quick Compiler in the future. Note: two data rows in tst_QQuickStyleSelector::select_data() had to be fixed. Not sure how the expected values ended up like that, but as the comments say, "Label.qml exists in the default and fallback styles" and "Button.qml exists in all styles", so it makes no sense to expect that Label.qml or Button.qml is selected from the FallbackStyle when a valid "data" folder is specified. Change-Id: I18dea9fddf8f079e0140b51b567814da0df2802c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-133-6/+69
|\| | | | | | | Change-Id: I32562a4aa6ca3090b28f624d675024f6b717bedb
| * Fix doubly connected signals in SignalSequenceSpySimon Hausmann2018-03-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We call __setup() from two different onFooChanged signal handlers. If we access the second property from within that method, we may end up being the first one to read that property and consequently require an initialization of the binding to that property first, which will write the value (before returning) and trigger the signal handler, recursively calling __setup() and thus calling connect() twice for each signal the spy wants to connect to. This used to be fine as we ended up with a _third_ evaluation that called __setup() and thus cleared the connections first, but after commit f514451cc2e3610e160b5dc8ccd1e390730ecc67 in declarative we avoid unnecessary binding evaluations if possible and therefore uncovered this bug. Task-number: QTBUG-66995 Change-Id: I83ef9c80978a88c1490174d3cdb21b149733a78f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * ComboBox: fix key search in the popupJ-P Nurmi2018-03-121-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Sliders and Dials: keep mouse grab on pressJ-P Nurmi2018-03-121-3/+7
| | | | | | | | | | | | | | | | | | | | | | Since Qt 5.9, Sliders and Dials react immediately on mouse press. Thus, the old logic to keep mouse grab if the drag threshold was exceeded no longer makes sense with mouse. Don't allow e.g. Drawer to steal mouse press if a Slider or Dial is already being dragged. Task-number: QTBUG-66637 Change-Id: I76f7ab59180c1f3fb66db8412d7cccfbd373aee3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSlider: add touchDragThreshold propertyYulong Bai2018-03-121-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add touchDragThreshold property for configuring the threshold to initiate a 'drag', i.e. touch move, of the handle of the slider. The mouse 'drag' won't be affected by the property. This property may be also used to configure the drag events stealing priorities of nested draggable items in the future. [ChangeLog][Slider] Added touchDragThreshold property for configuring the threshold to initiate the touch 'drag' of the handle of the slider. The mouse 'drag' won't be affected by the property. Task-number: QTBUG-62784 Change-Id: Ifaeea4653b48c44efbe7e1cb09d399a91359c16a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-103-0/+148
|\| | | | | | | Change-Id: Id5cd236e14238612647f7a897886be0202863132
| * QQuickDrawer: fix draggingv5.11.0-beta2J-P Nurmi2018-03-092-0/+129
| | | | | | | | | | | | | | | | | | | | Make sure to respect keepMouse|TouchGrab. This fixes dragging a horizontal Slider inside a Drawer on the left or right edge, for example. Task-number: QTBUG-66637 Change-Id: Ie3688744741378694f96abc608dad2630ecd1fb0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickPlatformMenu: fix submenu titles not being visibleMitch Curtis2018-03-071-0/+19
| | | | | | | | | | | | | | | | | | As with other properties in QQuickPlatformMenu, ensure that we set the relevant property on the internal QQuickPlatformMenuItem. Task-number: QTBUG-66876 Change-Id: Ie37d874426200014ea3bb4045bc6b566422221de Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-03-011-0/+37
|\| | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquicktheme.cpp Change-Id: I874011d32a379bf982f760c39c46d3a25e2452d6
| * Fix QQuickTheme::font() and palette()J-P Nurmi2018-03-011-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Respect fonts and palettes from :/qtquickcontrols2.conf, but don't blatantly override the platform fonts and palettes with null values if the fonts and palettes are not set in :/qtquickcontrols2.conf. Even though fonts and palettes have technically same problem, testing the system palette is hard with 5.11 since QQuickDefaultTheme is a platform proxy theme and provides a custom system palette. It should be possible to have tst_palette::systemPalette() in dev, though, where we have removed the inheritance between QQuickTheme and QPlatformTheme. Task-number: QTBUG-66430 Change-Id: I6dfe678ccdc7e3990320c120612cfcc68723264d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-02-271-0/+28
|\| | | | | | | | | | | | | Conflicts: tests/auto/controls/data/tst_dialogbuttonbox.qml Change-Id: I39ea99d988aaa7d1afd35d573cca44d009b859ce
| * DialogButtonBox: workaround implicit size calculation with one buttonv5.11.0-beta1J-P Nurmi2018-02-221-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there's only one button in the dialog button box, the Default and Universal styles resize the button to cover half of the button box. This works in typical scenarios when the dialog button box is assigned as a footer of a dialog, and thus, gets resized together with the dialog. However, if the dialog button box is placed into a layout, or otherwise not given an explicit size, the implicit size calculation loops until it reaches zero. 1) button box gets the implicit size of the content (one button) 2) button box resizes the button to cover half of the box width 3) button box re-calculates its implicit size => step 1 Avoid the problem by providing a reasonable hard-coded implicit size for this special case. Notice that this is just a temporary workaround to avoid the problem. This can be fixed properly in dev by providing separate contentWidth and contentHeight properties that cleanly propagate the content size to QML. Task-number: QTBUG-59719 Change-Id: I552e0824ae6bff26b570c699252a3e4f09bd3397 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickTheme: don't inherit QPlatformThemeJ-P Nurmi2018-02-273-30/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QPlatformTheme as a fallback instead of inheriting from it. This way, Qt Quick Controls 2 themes don't mess up the fonts and palettes of Qt Quick Controls 1 and Qt Widgets applications. Note: QQuickTheme::Font and QQuickTheme::Palette enums are copies of the respective enums in QPlatformTheme, for now. This is the simplest first step, but later on, we can have our own set of enums that cover controls, such as Switch, that were previously entirely missing from QPlatformTheme. Task-number: QTBUG-51921 Change-Id: I8efe0ba2d03d65bc12b55b533ba9f2fab5320348 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>