aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add changes file for Qt 5.9.5v5.9.5Antti Kokko2018-03-211-0/+56
| | | | | Change-Id: If2b564c673189582744b6fbd2b6cdedd2ee74669 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Doc: mention QT_QUICK_CONTROLS_CONF in conf docsMitch Curtis2018-02-121-0/+4
| | | | | Change-Id: I7f6d156d54a4c407853af5baa5bf59125ab35bde Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Bump versionOswald Buddenhagen2018-02-071-1/+1
| | | | Change-Id: I441fd7bf775a5eb02037fb51bd49b2f8b9efde96
* QQuickControl: respect wheel focus policy for focus scopesJ-P Nurmi2018-02-072-1/+12
| | | | | | | | | [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>
* Popup: fix restoring focus for popups that did not request focusJ-P Nurmi2018-02-062-5/+14
| | | | | | | | | | | | When a popup closes, if it has active focus, it should restore focus back to where it was regardless of whether the popup originally requested focus. Even if a popup does not request focus on open, it may gain focus programmatically or when a control with click-focus is clicked, for example. Task-number: QTBUG-66113 Change-Id: I9a7c467abe781bbef390d74898d13b9a30b2695b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickControl: respect click focus policy for focus scopesJ-P Nurmi2018-02-052-2/+82
| | | | | | | | | | | | | | | | | | | | | 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>
* QQuickPlatformMenu::open(): Scale target rectangleFriedemann Kleint2018-02-011-2/+4
| | | | | | | | The QPlatform* classes operate in native pixels. Task-number: QTBUG-55251 Change-Id: Ic9715bc062f7459054ed9735d133b1a5d05b60a2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QQuickComboBox: fix popup's deferred executionJ-P Nurmi2018-01-242-1/+15
| | | | | | | | | | | | | | | | | | | | | 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>
* Control: fix background size regression caused by deferred executionJ-P Nurmi2018-01-222-0/+9
| | | | | | Task-number: QTBUG-65880 Change-Id: Ic4f9fb087f4a78bd4c6257828011240186b6b22e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Explain the benefits of customizing a control vs creating a styleMitch Curtis2018-01-191-1/+11
| | | | | | | | | | | Mention that customizing a control is nice because you don't need to start from scratch with a template. Add a third requirement for "Definition of a Style" that mentions that the top level item must be a template, and why. Change-Id: I4db4ec8311baed46fb45271d107204808ba42592 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Link to Customizing doc from Styling docMitch Curtis2018-01-191-0/+1
| | | | | | | These two things are closely related. Change-Id: I1b4586f7835af6bd9f82aaa6eeb75fe1ef6ba65d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-181-0/+63
|\ | | | | | | Change-Id: I4a75933d225c276348f2d3ade855b3415bba4439
| * Add changes file for Qt 5.9.4v5.9.4Antti Kokko2018-01-051-0/+63
| | | | | | | | | | Change-Id: I03415ed1c96190aeb69bb7371068464684080776 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Tumbler: reduce amount of signal-slot connections and change listenersMitch Curtis2018-01-173-85/+28
| | | | | | | | | | | | | | | | | | Instead of adding change listeners and signal-slot connections for each attached object, add them once in QQuickTumbler and then notify each attached object all in one go. Change-Id: I6c5e76182c026b24922dcddaeb08ae4b1d4c4c38 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Tumbler: qualify references to visibleItemCount with "control"Mitch Curtis2018-01-174-4/+4
| | | | | | | | | | | | | | | | This code currently works, but we prefer to use control.<property> to access properties directly. Change-Id: Ieba95bffdd0b0a9b33373524248d0ac06e9f2a3d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Make Tumbler compatible with deferred executionMitch Curtis2018-01-178-76/+198
| | | | | | | | | | | | | | | | | | Now that the contentItem is created at a different stage, we have to shuffle some code around and add some null checks. Task-number: QTBUG-50992 Change-Id: I34d3a9ea9cb9ab54008a1015b37b1666538c085e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Tumbler: cleanup internal IDsJ-P Nurmi2018-01-114-23/+12
| | | | | | | | | | | | | | | | We can already cleanup the internal IDs even if Tumbler doesn't have deferred execution enabled. Change-Id: Ide9a0a6c6d1680c6df6b968b5702a6270fea3326 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_sanity: check for internal IDsJ-P Nurmi2018-01-112-0/+73
| | | | | | | | | | | | Task-number: QTBUG-65341 Change-Id: I51bd3390a18e50e37dfdd880dfa8df262d478b04 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_sanity: unblacklist ComboBoxJ-P Nurmi2018-01-111-4/+0
| | | | | | | | | | | | | | ComboBox no longer creates a popup instance at construction time. Change-Id: Ie036d75acbd2a7a391c1ed1af590409f4eddd587 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_sanity: exclude internal helper typesJ-P Nurmi2018-01-112-8/+8
| | | | | | | | | | | | | | | | Test file names against registered QML types to avoid including any internal helper types like CursorDelegate.qml and RectangularGlow.qml. Change-Id: Ia3079ea215eea59f7e405a50c3170fb4530f4239 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Remove unused QQuickControlPrivate::destroyDelegate()J-P Nurmi2018-01-112-25/+0
| | | | | | | | | | | | Task-number: QTBUG-65341 Change-Id: Ib64ec7ede42c140483554cf75e9bc16aa147be6c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add creation benchmarks for qmlbenchJ-P Nurmi2018-01-0547-0/+784
| | | | | | | | | | | | | | | | | | | | | | | | The qmlbench repo has benchmarks only for a subset of controls. They are part of a larger collection of benchmarks that are run periodically, for which the results are collected to Grafana. We have limited resources there, so we don't want to overload it with benchmarks for every single control type. However, for our own benchmarking purposes it is useful to be able to easily benchmark all of them. Change-Id: I920e4c07bce8356e5d9f41d4c1d6ae43e37bb13e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: improve Style/FallbackStyle documentationMitch Curtis2018-01-042-2/+33
| | | | | | | | | | | | | | | | | | Link to relevant documentation and add entries for the Controls section to the configuration file docs. Task-number: QTBUG-65445 Change-Id: I175866167e36403475520ea4de0cb299aae542d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Document license and attribute third party codeKai Koehne2018-01-043-0/+45
| | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Document constants from AngularJS in src/imports/controls/material/ElevationEffect.qml Task-number: QTBUG-65409 Change-Id: Ibd0dcf643abe036f34cea364f267fde8510057ea Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Fix qmlRegisterType() for RoundButtonJ-P Nurmi2018-01-041-1/+1
|/ | | | | | | | | RoundButton was a new type in QQC2.1 (Qt 5.8). Even though passing a non-existent revision seems to be harmless, registerTypes() becomes easier to read when we distinguish between new types and new revisions. Change-Id: I682006570f63dd0b2cb2260740fb105619e61a28 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: cleanup the internal ID from BusyIndicatorJ-P Nurmi2017-12-224-5/+28
| | | | | | | | | | | Same as da27cace for the Default style. An internal ID in the OpacityAnimator element prevented deferred execution for the whole content item. Apply the same visibility trick in C++ to avoid having to use an ID in QML. Change-Id: I4b54bbe3044aff9603b1135ac25d7325e01fdff2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix and test deferred execution for Universal & MaterialJ-P Nurmi2017-12-225-15/+10
| | | | | Change-Id: I8ee27a0c65c9ce8c9cc48c6f59d2b34d02849be8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_customization: comment out Tumbler for nowJ-P Nurmi2017-12-221-9/+2
| | | | | | | | | | Due to unclear auto test failurs, Tumbler does not yet have deferred execution enabled for its content item. Because of this, the test is getting full of skips and expect fail's for Tumbler. Just leave it out for now and restore later when Tumbler is fixed. Change-Id: Iab9465e002572d15e5bda6dbd53b71594f593703 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix tst_customizationJ-P Nurmi2017-12-221-1/+69
| | | | | | | | Fix style selection, and make override() actually fail with internal IDs in the built-in styles. Change-Id: Ied321c46cd74039f84b683fb6df99aef2d488eef Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: update code snippet to add some content to the DrawerMitch Curtis2017-12-221-0/+5
| | | | | | Task-number: QTBUG-60550 Change-Id: I14c4d0343e2b02180bbce0546a69a7241ee6008e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Material ToolButton: fix round ripple for square buttonsJ-P Nurmi2017-12-221-1/+1
| | | | | | | | | | | | The condition for checking whether a tool button is square and thus, whether it should use a round ripple instead of a fill ripple, must be based on the size of the contents, not on the implicit size. This way, you get a round ripple for one-letter tool buttons but only if they are not stretched. Task-number: QTBUG-65052 Change-Id: I0d498dc65650f3b786b41e538748549d61f2b216 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix license headersJani Heikkinen2017-12-226-36/+1232
| | | | | | | | | Old header.LGPL21 header was used at some files. Replase those with new header.LGPL one Task-number: QTBUG-57147 Change-Id: I7d707c15b33c0f14810ef8fffef9f74dd4192e64 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix deferred executionJ-P Nurmi2017-12-2170-36/+3643
| | | | | | | | | | | | | | | | | | 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>
* Default: eliminate internal IDs in DelayButtonJ-P Nurmi2017-12-218-43/+452
| | | | | | | | | | | | | | | | An ID in the internal Text element prevented deferred execution for the whole content item. The ID was used for two reasons. First of all, it was used to propagate implicit size from the Text element to the root of the content item. Secondly, it was used to calculate clip areas to provide the same text in two different colors. This patch provides two internal C++ helpers, ItemGroup and ClippedText, that provide these functionalities without the need of using IDs in QML. At the same time we got rid of two wrapper Items and simplified some QML bindings, which results to a nice boost (18->22) in qmlbench on TX1. Task-number: QTBUG-65341 Change-Id: Icf9c09356cf5c0ed641bde537bee7291bd260057 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: cleanup the internal ID from BusyIndicatorJ-P Nurmi2017-12-204-5/+28
| | | | | | | | | | An internal ID in the OpacityAnimator element prevented deferred execution for the whole content item. Apply the same visibility trick in C++ to avoid having to use an ID in QML. Task-number: QTBUG-65341 Change-Id: Icb20e4ecc60d1093e849737799bb269f7f03097a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: cleanup and test internal IDsJ-P Nurmi2017-12-204-9/+18
| | | | | | | | | Remove the undesired internal IDs where easily possible, and add expected failures for the harder ones for now. Task-number: QTBUG-65341 Change-Id: I5964b2cb59652661c90141259c68b95c721cf6ca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make tst_customization easier to maintainJ-P Nurmi2017-12-2016-256/+69
| | | | | | | | | | | | | | | | Maintain the tested controls and delegates in a single array that can be re-used for testing all styles without repetitive and error-prone hand-written data rows. For this to work, the structure of the tested styles must match. The "incomplete" and "override" styles filled in all possible delegates, whereas the "simple" style filled in only the normally used delegates. The test styles have now been synced with the structure of our built- in styles. For example, Dials and Sliders don't normally have a content item, and CheckBoxes and RadioButtons don't normally have a background. Change-Id: I48a26ee170f66882c55b54a282f2e4b3a3875f9a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Attempt to stabilize tst_tumbler::test_itemsCorrectlyPositioned()J-P Nurmi2017-12-201-2/+2
| | | | | | | | | | | | | | | Since 8e4b910, we've been often seeing the following failure in CI: FAIL! : tst_controls::Default::Tumbler::test_itemsCorrectlyPositioned() Compared values are not the same Actual (): 0.00008000000001118224 Expected (): 0 Loc: [/Users/qt/work/qt/qtquickcontrols2/tests/auto/controls/data/tst_tumbler.qml(352)] QQuickPathView uses such tiny 0.00001 offsets internally. => Use fuzzy compare for the expected position. Change-Id: Ie6c1025003aa57335232d23fb8466d1578dc1ab3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Examples: cleanup unnecessary/wrong property assignmentsJ-P Nurmi2017-12-209-11/+0
| | | | | Change-Id: Id7c65c9493c0e70512f3f2b167a091ece06ee5d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Universal: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-2011-20/+0
| | | | | Change-Id: I80c258ea21b4f6651e9c6e075357daabfb32d64b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Material: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-2011-20/+0
| | | | | Change-Id: I1698392b1ef75b84d114cb19207729217abb4aed Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* StackView: don't block touchJ-P Nurmi2017-12-203-0/+33
| | | | | | | | | | | Unlike with mouse events there's setAcceptedMouseButtons(), currently there's no way to control whether a control receives touch events or not. As a temporary workaround until QQuickItem::setAcceptTouchEvents() has been added, we'll have to ignore touch events by hand. Task-number: QTBUG-65084 Change-Id: I3d51bdc80981557399f3bdfd181e359679cd1c20 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Default: cleanup unnecessary property assignmentsJ-P Nurmi2017-12-1911-20/+0
| | | | | | | | | QQuickText's default horizontal alignment is AlignLeft. There's no need to repeat the default. Furthermore, an empty QQuickText element does not do anything, so the "visible: control.text" binding seems bogus. Change-Id: I9461301606c45a3d889ad49e62356d38fcef6f87 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SwipeView: fix slow swiping in large viewsJ-P Nurmi2017-12-192-0/+2
| | | | | | | | | | | Flickable has a default maximumFlickVelocity of 2500 regardless of its size. When SwipeView covers the whole screen and ends up being large, 2500 pixels per second is nowhere near enough. Calculate a suitable maximum flick velocity based on the size of the view. Task-number: QTBUG-62110 Change-Id: Iaf26f586f99e7635ea931a4e3060ad4dd480a011 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popups: use deferred executionJ-P Nurmi2017-12-1927-11/+1356
| | | | | | | | | | | QQuickPopup is backed by a QQuickControl subclass aka QQuickPopupItem. However, since the QML engine sees "background" and "contentItem" as properties of QQuickPopup, we must ensure that the deferred properties are executed for the QQuickPopup wrapper object. Task-number: QTBUG-50992 Change-Id: I2ec055b382e41530a6f4a740cb80853c0181c21a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Control: defer the execution of the content itemJ-P Nurmi2017-12-1516-71/+18
| | | | | | | | | 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-1511-9/+2
| | | | | | Task-number: QTBUG-50992 Change-Id: I6372e143c68f0a5bf7212d759281acef3c81618e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Page: use deferred executionJ-P Nurmi2017-12-143-1/+5
| | | | | Change-Id: Icb22f656893c89f61233bb547f03e63240bb8f97 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Extend and improve tst_customizationJ-P Nurmi2017-12-14155-118/+8148
| | | | | | | | | | | | | | | | | | | | Add more test cases, and clarify the roles of the test styles. - empty: no delegates at all - incomplete: has all delegates, but with no bindings that access delegates and therefore trigger creation (tests that delegates must be created regardless) - simple: has all delegates and creates bindings to simulate a full style - override: overrides the simple style and tests that the default instances of overridden delegates are not created There are still several non-popup controls that lack deferred execution. These are marked with QEXPECT_FAIL() to make it easy to track what's missing. This list still excludes all popups. Task-number: QTBUG-50992 Change-Id: I70ce42592e7a320251edebfab3030ccc7c0eb978 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SpinBox: use deferred executionJ-P Nurmi2017-12-147-15/+348
| | | | | | | | | | tst_controls::SpinBox::test_initialFocus() caught an issue that focus was not transferred as expected when the creation of the content item was deferred. Task-number: QTBUG-50992 Change-Id: I6b9f5684ab7141fa4ebfe4c7fe3e32528553b96d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>