diff options
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p.cpp')
-rw-r--r-- | src/quicktemplates2/qquickstackview_p.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/quicktemplates2/qquickstackview_p.cpp b/src/quicktemplates2/qquickstackview_p.cpp index 5a83f5e5..96f70d80 100644 --- a/src/quicktemplates2/qquickstackview_p.cpp +++ b/src/quicktemplates2/qquickstackview_p.cpp @@ -72,7 +72,7 @@ private: QQuickStackElement::QQuickStackElement() : QQuickItemViewTransitionableItem(nullptr), index(-1), init(false), removal(false), ownItem(false), ownComponent(false), widthValid(false), heightValid(false), - context(nullptr), component(nullptr), incubator(nullptr), view(nullptr), + context(nullptr), component(nullptr), view(nullptr), status(QQuickStackView::Inactive) { } @@ -107,7 +107,6 @@ QQuickStackElement::~QQuickStackElement() } delete context; - delete incubator; } QQuickStackElement *QQuickStackElement::fromString(const QString &str, QQuickStackView *view) @@ -144,9 +143,8 @@ bool QQuickStackElement::load(QQuickStackView *parent) context = new QQmlContext(creationContext); context->setContextObject(parent); - delete incubator; - incubator = new QQuickStackIncubator(this); - component->create(*incubator, context); + QQuickStackIncubator incubator(this); + component->create(incubator, context); if (component->isError()) qWarning() << qPrintable(component->errorString().trimmed()); } else { |