aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-152-12/+9
|\ | | | | | | Change-Id: Ide4b85626dd153b534c39a3afa2f3b9e732badf5
| * DialogButtonBox: micro optimization for resizeContent()Konstantin Ritt2017-11-081-9/+6
| | | | | | | | | | Change-Id: Ie72671fb92108dfaf5aaae4ea3ffb279e14b2f1a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Fix QQuickSlider::valueAt()J-P Nurmi2017-11-071-3/+3
| | | | | | | | | | | | Task-number: QTBUG-64065 Change-Id: Id77a85ce5b88c20795e9f7fe9d2ece974f46a315 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Re-order revision 3 members and add explanatory commentsJ-P Nurmi2017-11-0622-69/+117
| | | | | | | | | | | | | | | | | | | | | | | | 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. The same was done for earlier revisions in 5.9 in commit 430fe83. Change-Id: I738d7fdadd348c21737228c37d0f31e39b37f8e7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-11-0631-435/+520
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0628-396/+469
| | | | | | | | | | | | | | | | | | | | 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>
| * DialogButtonBox: fix height calculation due to a trivial typoKonstantin Ritt2017-11-031-1/+1
| | | | | | | | | | Change-Id: I7bfb3505cf34b6e8a6f670abd81ee6e39084a1fc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * QQuickSlider: migitate value rounding errorsJ-P Nurmi2017-11-031-1/+4
| | | | | | | | | | | | Task-number: QTBUG-64065 Change-Id: I7182cf24197250c927c8cc5227356e835e55a130 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickTextField: retain selection on right mouse button clickJ-P Nurmi2017-11-031-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextField wants to emit pressed(), released(), and pressAndHold() signals not only on left, but on all mouse button clicks. Therefore it explicitly sets accepted mouse buttons to all. However, the base class, QQuickTextInput, has only been prepared to handle left (selection) and middle (paste) mouse buttons. Don't pass right mouse button -only events to the base class to avoid it clearing selection on right click. Task-number: QTBUG-64048 Change-Id: I015820c78995cc8dd7cbeb16fca0f9b991040bad Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: mention the Side Panel example in Drawer's detailed descriptionJ-P Nurmi2017-11-031-0/+5
| | | | | | | | | | | | Task-number: QTBUG-64099 Change-Id: I6580f1779e2863e25980968b076f342a5d76d423 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revert "QQuickTabBar: optimize layouting"J-P Nurmi2017-11-021-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 80f6b146e6a1b3e7164a728271c0e17eb25c3e98, because the optimizations caused a binding loop on the TabBar page in the Gallery example. qrc:/pages/TabBarPage.qml:90:13: QML TabBar: Binding loop detected for property "implicitHeight" As a result, the tabs are looking broken at least when running with the Imagine style. Change-Id: I231bf5b21ecf92000bac94782567301214b64fec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Visualize mnemonicsJ-P Nurmi2017-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately this comes a bit late in the 5.10 cycle, but this should be released together with the rest of the mnemonics stuff going out in 5.10, because it affects the value of AbstractButton/Menu(Bar)Item::text. As the removed TODO comments and altered tests indicate, previously the ampersand was blatantly stripped out. It would be worse to change it later once people have already started using mnemonics and rely on the behavior in custom styles. The necessary modifications to QQuickText were added in qtdeclarative commit 65ef4ba. Task-number: QTBUG-61422 Change-Id: Iaa73da8c012e9a6019743cf98f5bdc02527064e5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Optimize QQuickTumblerJ-P Nurmi2017-11-023-98/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Listen to the relevant view changes once in QQuickTumbler and cache the offset/contentY instead of every QQuickTumblerAttached instance doing its own geometry and child tracking, and cache the view offset or contentY so that they are readily available while calculating displacements for attached property objects. This gives a 5% boost (40->42 frames in qmlbench) on TX1 in release mode. Change-Id: If1a77468e812e65bc07f32216ff9bf2e1dc5b935 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-0/+1
|\| | | | | | | | | | | | | Conflicts: src/imports/controls/MenuItem.qml Change-Id: Id4cae0e53a58796694ad1fc9f8380b317ee62984
| * Fix resource leakJesus Fernandez2017-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The system resource will not be reclaimed and reused, reducing the future availability of the resource. In QQuickStackView::​componentComplete(): Leak of memory or pointers to system resources (CWE-404) Coverity-Id: 178431 Change-Id: Iff8f8e2d228042789faae56512fd3255c3e56498 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Document palette as a basic QML typeJ-P Nurmi2017-10-273-2/+4
| | | | | | | | | | | | | | | | | | | | Unfortunately we need to manually add some \sa "palette QML Basic Type" links as a workaround until auto-linking to basic QML types in QML property headers is fixed in QDoc. Task-number: QTBUG-63469 Change-Id: I2ea853bfeda31905468741eb720f4daa242e703d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickSpinBox: fix internal setValue() argumentsJ-P Nurmi2017-10-271-2/+2
| | | | | | | | | | | | Task-number: QTBUG-64075 Change-Id: Ifd48b6d0075ab1930be3d759b18292b5038bcc17 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Docs: promote the icon docs on its own pageJ-P Nurmi2017-10-231-52/+2
| | | | | | | | | | | | | | | | | | | | - other controls (textfield, combobox, ...) will eventually gain support for icons too - advertise icon support on the index page amongst other important topics - document the steps for building an icon theme with high-dpi support Change-Id: I35ed76ef005d7e273beb5f5147ca92849adc0d90 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Docs: make button icons sound as worthy as text labelsJ-P Nurmi2017-10-234-11/+10
| | | | | | | | | | | | | | | | Advertise text and icon properties equally. The additional mention of the icon property make icons sound somehow less worthy. :) Change-Id: I564954091ba9d484abda702ce4ba46ddebe7a082 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-10-225-13/+36
|\| | | | | | | Change-Id: I9188f94e40e2ecb4da1963ce2fcf915ab7a4b4fb
| * QQuickDialogButtonBox: fix potential crash in updateLayout()J-P Nurmi2017-10-201-2/+2
| | | | | | | | | | | | | | | | | | Don't dereference the contentItem pointer without checking. We can use availableWidth/Height as a fallback. Task-number: QTBUG-63898 Change-Id: I1ef7704e96e233036eacd6e3586f5bd0c72fac2d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickContainer: fix itemSiblingOrderChanged()J-P Nurmi2017-10-173-11/+32
| | | | | | | | | | | | | | | | | | | | | | The problem was that QQuickContainer started already moving items while QQmlObjectModel was creating items and QQuickRepeater was initializing the order. Don't reorder items during the creation, but only after component completion. Task-number: QTBUG-61310 Change-Id: I13380c5ab6b3bddaad3fa03ef6fb028622b4cd11 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickToolTip: disable hoverJ-P Nurmi2017-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | Tooltips are special popups that should not block hover, because it conflicts with the typical condition for showing tooltips on desktop platforms. Task-number: QTBUG-63644 Change-Id: Ie974aed23a7df8e4b926bec5fe717cb909d15842 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | qquickapplicationwindow_p.h: make REVISION comment qdoc-compatibleJ-P Nurmi2017-10-201-1/+1
| | | | | | | | | | | | | | | | qquickapplicationwindow_p.h:149: warning: Failed to parse token /*REVISION 3*/ in property declaration Change-Id: If63cb8a5beaa1e738ffe51b73b0a4817ce0c16fc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Revert "SwipeDelegate: grab the mouse when accepting a press event"J-P Nurmi2017-10-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 31d90e308e46d644d74e9434ce31dd664677bc59 without bringing back the blacklists that were added in commit 4d12ab2c6a62e2771e7cc9c2c67ab48962987421. These explicit grab calls are no longer needed. The root cause was fixed in qtdeclarative commit 2dd530ca35032465d4e928aa7c8f29563eb0c5da. Change-Id: Ie22b05ee00cd6e104d99732eddcd9d0652b6a7e0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-10-124-17/+19
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quicktemplates2/qquickbuttongroup.cpp src/quicktemplates2/qquickoverlay.cpp tests/auto/controls/data/tst_buttongroup.qml Change-Id: Iae23aaf039c6095007966475294e93220dbead84
| * Doc: state which input devices cause certain signalsMitch Curtis2017-10-101-6/+6
| | | | | | | | | | Change-Id: Ib56041e69547e03d7db10974d4638748f99fd2bf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Fix the QML context of popup background dimmersJ-P Nurmi2017-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We were accidentally passing QQuickOverlay as a QML context parent for dynamically created popup background dimmers. There is only one overlay per window, and the overlay is not destroyed when a popup is destroyed. QQuickOverlay is just a visual parent item for popup background dimmers, but the actual owner is QQuickPopup. Make sure to pass the popup instance as a QML context parent to ensure that the popup background dimmer's QML context is cleaned up when the popup is destroyed. Task-number: QTBUG-63672 Change-Id: I5cabbcef5035cef40af3c9edbcd8f7ae3157bd8a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickScrollView: fix binding loop with wrapping TextAreaJ-P Nurmi2017-09-281-3/+9
| | | | | | | | | | | | | | | | | | | | Start keeping track of the content size only after the component is complete, to avoid creation time ping pong with content size updates and content item resizing. Task-number: QTBUG-62325 Change-Id: I4b75dc398d0b746dd7e0b04291270f47f91bb7e6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickButtonGroup: track the checked button with a QPointerJ-P Nurmi2017-09-281-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | A destroyed button removes itself from a group, but because of the workaround added for QTBUG-52358, there's a moment after clear() when a button is removed from a group and before it is added back to the group. If the button gets destroyed during that period, the group ends up with a dangling pointer. Task-number: QTBUG-62946 Task-number: QTBUG-63470 Change-Id: If994f87b221a7e77f56458866c4d132365c45d6f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: fix Action snippetsJ-P Nurmi2017-10-091-0/+6
| | | | | | | | | | | | | | | | These actions should be checkable. Task-number: QTBUG-63674 Change-Id: If24f00951dc3959df27482fbad844ebeb723b37d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickAction: don't uncheck the checked action of an exclusive groupJ-P Nurmi2017-10-091-2/+5
| | | | | | | | | | | | | | | | The logic is adapted from QAction::activate(). Task-number: QTBUG-63674 Change-Id: I7af127ea917e40e6a8ca99c2528362cf6ad283b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickActionGroup: add missing default propertyJ-P Nurmi2017-10-091-0/+1
| | | | | | | | | | | | Task-number: QTBUG-63674 Change-Id: I7e8eef4080f123ba5ad6b9ffa8bd8613c1b7b724 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickActionGroup: track the checked button with a QPointerJ-P Nurmi2017-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | Same as 3f1229b for QQuickButtonGroup, but testing this in QML seems too tricky since you can't use Repeater for non-Item Actions, and Instantiator does not provide a suitable list-property for the objects, that could be used to reproduce the issue. Change-Id: I43dfd76214b8b595be18cf4ab0d04ad1ff2a240d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickApplicationWindow: reduce the amount of re-layoutingJ-P Nurmi2017-09-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 80f6b14 introduced a binding loop in testbench: qrc:/testbench.qml:263:13: QML TabBar: Binding loop detected for property "implicitWidth" This issue is best to fix in QQuickApplicationWindow, which is causing the loop by being way too eager to force-resize the TabBar in the middle of calculating its initial implicit size. Let it complete construction first. Change-Id: Ie3d8679efc73002af6c37f17c138b2f1e9668897 Reviewed-by: Mitch Curtis <mitch.curtis@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 5.10J-P Nurmi2017-09-1111-20/+61
|\| | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquicklabel.cpp src/quicktemplates2/qquicktextarea.cpp src/quicktemplates2/qquicktextfield.cpp Change-Id: Ibbf6bc48972f58fbc6779a87ac9e2434c56c4db8
| * Fix font inheritanceJ-P Nurmi2017-09-114-9/+12
| | | | | | | | | | | | | | | | | | | | In item views, it can happen during incubation that a control doesn't yet have a window associated when the parent item changes. Therefore we must make sure to resolve the font when the window changes. Task-number: QTBUG-63119 Change-Id: I890f70ae6faa232dcc2c094ccec02e76b371d2cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fully qualify atan2 with the std namespaceJake Petroules2017-09-081-1/+1
| | | | | | | | | | | | | | | | This fixes the build on VxWorks Change-Id: I5ba3d182184151b62e3ed6c0ab5e4d77a0e66768 Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * Fix non-modal drawer drag/swipe open and closeMichal Policht2017-09-062-1/+26
| | | | | | | | | | | | | | | | | | | | Function QQuickPopupPrivate::blockInput() has been overridden in QQuickDrawerPrivate to accept events that occur while mouse/touch is grabbed and events within drag area. Task-number: QTBUG-59652 Change-Id: Icf4129e702a351b266ea9c4544830185c315fc37 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Android: fix clang compilation with -qreal floatVyacheslav Koscheev2017-09-013-6/+6
| | | | | | | | | | Change-Id: Ica7a417aa1bb531bc63e3fa9dda0505a6e552b67 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * QQuickSpinBox: fix initial value validationJ-P Nurmi2017-08-291-2/+4
| | | | | | | | | | | | Task-number: QTBUG-62508 Change-Id: I8981968c02b65d4b005eb9b54b0228fd51a3abda Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix a crash with ScrollView + TextAreaJ-P Nurmi2017-08-292-1/+9
| | | | | | | | | | | | | | | | | | TextArea was not cleaning up its geometry change listener on the Flickable it was attached to. Task-number: QTBUG-62292 Change-Id: I31223d4fcf0b46235b18e8eb05bab686a32f5481 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devJ-P Nurmi2017-09-016-48/+82
|\ \ | | | | | | | | | Change-Id: I581d64b0c3fbf98750756c9386c6166051834252
| * | QQuickTabBar: optimize layoutingJ-P Nurmi2017-09-011-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTabBarPrivate::updateLayout() was being called quite many times during the creation. This patch reduces the amount of calls significantly and gives a little boost in qmlbench too (~133 => ~140). Change-Id: I6f8b31919cdc1a5e6cf4d133c5e55e400f3f8c26 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Make use of QQuickItem::ItemEnabledHasChangedJ-P Nurmi2017-08-314-31/+48
| | | | | | | | | | | | | | | | | | | | | | | | It was added in qtdeclarative commit 286f14f1. Getting rid of the slow QObject::connect() gives a little boost of 1~2 frames in qmlbench. Change-Id: If027fe2bee9eedad572afe8828b302c2f44cffac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Fix accessibility-related performance regressionsJ-P Nurmi2017-08-315-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 089dd16f, we had a QQuickControlPrivate::accessibleAttached member that indicated whether accessibility was active. Since 4be38ab in qtdeclarative, it was possible to access QQuickAccessibleAttached:: attachedProperties() directly, but we ended up accidentally accessing it even when accessibility was not active, which added noticeable overhead. This improves those qmlbench test cases that call accessibility-aware setters such as QQuickAbstractButton::setChecked() a lot. For example, the test cases for CheckBox and RadioButton create large amounts of controls with a "checked: index % 2" binding. - CheckBox: 84 => 93 frames - RadioButton: 98 => 113 frames QAccessible::setActive(true) only notifies the observers, but does not really make accessibility active in the sense that the consequent calls to QAccessible::isActive() still return false. tst_accessible had to be changed to use QPlatformAccessible::setActive() instead. Change-Id: I8fd0fe2dddfd5633ce22a080bcda459f2d6e443e Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Add ApplicationWindow::menuBarJ-P Nurmi2017-08-312-27/+116
| | | | | | | | | | | | | | | | | | | | | A follow-up commit to 66faa149. Change-Id: I94c92752d54ae0ca4878da72915b3d83461a4124 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | qquickapplicationwindow.cpp: de-duplicate item change typesJ-P Nurmi2017-08-311-12/+9
|/ / | | | | | | | | Change-Id: Id2eb59bd696c408335813a27f393350d331f526f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | SwipeDelegate: grab the mouse when accepting a press eventShawn Rutledge2017-08-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 1f4bfc099b7e48e2cc3dd9488b7b42a96122b299 in qtdeclarative, QQuickWindow does not cause the Item to which it's about to attempt to deliver an event to pre-grab. (That caused a lot of thrashing of the grabber, so not doing that is a nice simplification, and also avoids the need to ungrab later, and also makes mouse event handling more like touch event handling.) So whenever SwipeDelegate knows at the time of mouse press that it wants to see the release too, it should grab. The grabber can be either the Item for which it's filtering events, or the SwipeDelegate itself, whichever is more appropriate in any given scenario. For now I assume it should be the delivery-target Item, because that's what would have had the grab before. Task-number: QTBUG-62412 Task-number: QTBUG-62631 Change-Id: Ie01276508c6602b10f9d7996a748ffe90efa36b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>