aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpane_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-071-7/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Control: add implicitContentWidth|Height propertiesJ-P Nurmi2018-04-131-4/+4
| | | | | | | | | | | | | | | | | | [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-3/+0
| | | | | | | | | | | | | | | | | | | | [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>
* | Inherit QQuickControlPrivate from QQuickItemChangeListenerJ-P Nurmi2018-04-121-2/+1
| | | | | | | | | | | | | | | | | | | | This is a preparation step to allow QQuickControl to listen to implicit size changes in the background and content item, so that we can eventually add support for insets. Task-number: QTBUG-60156 Change-Id: Ifa2ca9d2a19c8237cd050d883552542ed119f344 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickScrollView: inherit QQuickPaneJ-P Nurmi2018-04-051-2/+3
| | | | | | | | | | | | | | | | | | This allows us to remove duplicate properties, and ScrollView gets Pane's automatic content size calculation, which allows us to remove the respective QML bindings. Change-Id: I96ba98c12d0bf294f19b2c2b3617bfc88326bb41 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPane: cleanup content size calculation - part IIJ-P Nurmi2018-04-051-2/+5
| | | | | | | | | | | | | | | | A follow up commit to 6fcfb8d. This is a preparation step to make QQuickPane a suitable base class for QQuickScrollView. Change-Id: I98cda1a03a93ee31676b79c2542cce61075392f5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use Q_PRIVATE_PROPERTY for QQmlListPropertyJ-P Nurmi2018-04-041-0/+3
| | | | | | | | | | | | | | | | Hide QQmlListProperty, which is close to unusable in C++, from the templates C++ API. Change-Id: I9720fc3297fc625076a8a7553245852b641bc65a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPane: cleanup content size calculationJ-P Nurmi2018-03-231-3/+3
| | | | | | | | | | | | | | | | The previous commit made it possible to avoid passing the content item around to calculate the current content size. Change-Id: I8e7713d5fe10d420461c37607cf2e4f5d8c1651c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickPane: fix a regression in implicit size calculationJ-P Nurmi2018-03-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QQuickPane: calculate content size in C++ unless explicitly definedJ-P Nurmi2018-03-091-1/+17
|/ | | | | | | | | | | | | | No more need for the clumsy and slow contentWidth and contentHeight bindings in Pane and its derivatives. QmlBench on TX1: Pane: 26.4 -> 32.8 frames (~24%) Frame: 25.4 -> 31 frames (~22%) GroupBox: 28.6 -> 32 frames (~12%) Change-Id: I4ba1d46ba6328de2ee0955c241d4b090127f6b85 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Create contentItem lazily where possibleJ-P Nurmi2016-09-261-0/+2
| | | | | | | | | | | | | | | | | | | | | The existence of a content item is obligatory for such controls that alias the contentData and contentChildren properties to the data and children properties of the content item. Even though we created empty content items in QML to ensure one always exists, it did not not guarantee that a content item would exist for custom styles. Furthermore, the empty content item was unnecessarily created and destroyed when the property was overridden for a customized control in QML. This change creates the content item lazily where required, ensuring that it always exists even for custom styles, but does not create it in case a content item is supplied from QML. Task-number: QTBUG-54347 Task-number: QTBUG-56038 Change-Id: I714ef4f8c366f0f449b922b2c16c0ec653fbd364 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Q_QUICKTEMPLATES2_EXPORT => Q_QUICKTEMPLATES2_PRIVATE_EXPORTMitch Curtis2016-04-271-1/+1
| | | | | | | They're all private classes. Change-Id: I2f1463429109c5651f9cca5bc7aabe5cf0f79637 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Templates: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-131-0/+70
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>