diff options
| author | Mitch Curtis <mitch.curtis@qt.io> | 2025-06-23 14:25:32 +0800 |
|---|---|---|
| committer | Mitch Curtis <mitch.curtis@qt.io> | 2025-06-25 06:45:18 +0000 |
| commit | 270bd4dc05c8af5463e9bb28e6765a4f93459cc0 (patch) | |
| tree | 8ccc3fa3d9098c10dc2f3073d98a8e013371713b /src/quickdialogs/quickdialogsquickimpl | |
| parent | e0620d4d67a6167b28fcf2c9de66f03aa664eea5 (diff) | |
Don't delete component delegates
This makes it impossible to e.g. swap between two delegates.
Similar to 80f1186338bcf8c7d692b4fadfc46531c002c6b0 except for
QQmlComponents.
[ChangeLog][Controls][Important Behavior Changes] Old QQmlComponent
delegates (not the item instances created by them) are no longer
destroyed when a new one is set, as they are technically owned by user
code. They will still eventually be garbage-collected as expected,
assuming there are no references to them.
Fixes: QTBUG-137777
Change-Id: Icbe6971727d684a266b12a0b41474397e536bfdc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quickdialogs/quickdialogsquickimpl')
| -rw-r--r-- | src/quickdialogs/quickdialogsquickimpl/qquickcolorinputs.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/quickdialogs/quickdialogsquickimpl/qquickcolorinputs.cpp b/src/quickdialogs/quickdialogsquickimpl/qquickcolorinputs.cpp index 1ff63d7253..607e702848 100644 --- a/src/quickdialogs/quickdialogsquickimpl/qquickcolorinputs.cpp +++ b/src/quickdialogs/quickdialogsquickimpl/qquickcolorinputs.cpp @@ -172,8 +172,6 @@ void QQuickColorInputs::setDelegate(QQmlComponent *delegate) Q_D(QQuickColorInputs); if (d->m_delegate == delegate) return; - if (d->m_delegate) - delete d->m_delegate; d->m_delegate = delegate; emit delegateChanged(); } |
