diff options
Diffstat (limited to 'src/gui/itemviews/qtreewidgetitemiterator.cpp')
-rw-r--r-- | src/gui/itemviews/qtreewidgetitemiterator.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/itemviews/qtreewidgetitemiterator.cpp b/src/gui/itemviews/qtreewidgetitemiterator.cpp index 14aca3a..b6f56a0 100644 --- a/src/gui/itemviews/qtreewidgetitemiterator.cpp +++ b/src/gui/itemviews/qtreewidgetitemiterator.cpp @@ -97,7 +97,7 @@ QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidget *widget, IteratorFl Q_ASSERT(widget); QTreeModel *model = qobject_cast<QTreeModel*>(widget->model()); Q_ASSERT(model); - d_ptr = new QTreeWidgetItemIteratorPrivate(this, model); + d_ptr.reset(new QTreeWidgetItemIteratorPrivate(this, model)); model->iterators.append(this); if (!model->rootItem->children.isEmpty()) current = model->rootItem->children.first(); if (current && !matchesFlags(current)) @@ -150,7 +150,6 @@ QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidgetItem *item, Iterator QTreeWidgetItemIterator::~QTreeWidgetItemIterator() { d_func()->m_model->iterators.removeAll(this); - delete d_ptr; } /*! |