Setup parent pointer

Rely on Qt to do the delete, since the parent ownership is setup
correctly.
This commit is contained in:
Chocobo1 2017-03-08 13:01:59 +08:00
parent a16c557137
commit 86e82c71e5
5 changed files with 7 additions and 11 deletions

View file

@ -718,7 +718,7 @@ void AddNewTorrentDialog::setupTreeview()
m_contentModel = new TorrentContentFilterModel(this);
connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel()));
ui->contentTreeView->setModel(m_contentModel);
m_contentDelegate = new PropListDelegate();
m_contentDelegate = new PropListDelegate(nullptr);
ui->contentTreeView->setItemDelegate(m_contentDelegate);
connect(ui->contentTreeView, SIGNAL(clicked(const QModelIndex &)), ui->contentTreeView, SLOT(edit(const QModelIndex &)));
connect(ui->contentTreeView, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(displayContentTreeMenu(const QPoint &)));