Skip to content
Verified Commit e53c7482 authored by ivan tkachenko's avatar ivan tkachenko 🗯
Browse files

PromptDialog: Create default contentItem dynamically on demand

Porting from QQC2.Control to Kirigami.Padding had an unintended
consequence: QtQuickControl uses private API magic to "defer execution"
of its contentItem and background properties to delete overridden
declarative items at componentComplete() hook, but also it hides unset
items regardless of whether or not they'll be deleted later.

Since we can't use deferred pointers (because they are private), we
can't delete intermediate/default item, so let's create it imperatively
if nothing else was declared by the time a component is completed.

Note: it does not matter which component to hook for completion, as all
of them within the creation scope will have all their declarative
properties fully initialized by that time, guaranteeing that the
mainItem (alias for wrapper.contentItem) will be set.
parent efb5b04f
Pipeline #660113 passed with stage
in 3 minutes and 10 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment