path: root/src/imports/controls/Frame.qml
diff options
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-26 13:35:13 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-26 14:38:00 +0000
commit0e3636a4692c9cf89d994f3fe5c1c110b4c6ee61 (patch)
tree35a6cce16c40ba0cde663ff8c41086d19b527dc9 /src/imports/controls/Frame.qml
parent11b066beb45e7da084c6f792cf9421d48d4b40bf (diff)
Create contentItem lazily where possible
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>
Diffstat (limited to 'src/imports/controls/Frame.qml')
1 files changed, 0 insertions, 4 deletions
diff --git a/src/imports/controls/Frame.qml b/src/imports/controls/Frame.qml
index e1148496..ef716f72 100644
--- a/src/imports/controls/Frame.qml
+++ b/src/imports/controls/Frame.qml
@@ -50,10 +50,6 @@ T.Frame {
padding: 12
- //! [contentItem]
- contentItem: Item { }
- //! [contentItem]
//! [background]
background: Rectangle {
color: "transparent"