diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-09-26 13:35:13 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-26 14:38:00 +0000 |
commit | 0e3636a4692c9cf89d994f3fe5c1c110b4c6ee61 (patch) | |
tree | 35a6cce16c40ba0cde663ff8c41086d19b527dc9 /src/imports/controls/universal/Dialog.qml | |
parent | 11b066beb45e7da084c6f792cf9421d48d4b40bf (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/universal/Dialog.qml')
-rw-r--r-- | src/imports/controls/universal/Dialog.qml | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/imports/controls/universal/Dialog.qml b/src/imports/controls/universal/Dialog.qml index 1a2d6839..bda9bbb1 100644 --- a/src/imports/controls/universal/Dialog.qml +++ b/src/imports/controls/universal/Dialog.qml @@ -57,8 +57,6 @@ T.Dialog { topPadding: 18 bottomPadding: 0 - contentItem: Item { } - background: Rectangle { color: control.Universal.chromeMediumLowColor border.color: control.Universal.chromeHighColor |