aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickspinbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickspinbox.cpp')
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index 4368236a..da3ea40e 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -992,12 +992,7 @@ void QQuickSpinButton::setIndicator(QQuickItem *indicator)
if (d->indicator == indicator)
return;
- QQuickControl *control = qobject_cast<QQuickControl*>(d->parent);
- if (control)
- QQuickControlPrivate::get(control)->deleteDelegate(d->indicator);
- else
- delete d->indicator;
-
+ QQuickControlPrivate::destroyDelegate(d->indicator, d->parent);
d->indicator = indicator;
if (indicator) {