DolphinQt: Fix memory lkea in FilesystemWidget
QTreeView::setModel doesn't transfer ownership of the object. Setting the parent resolves this
This commit is contained in:
parent
b63b574a3f
commit
2dca24229b
|
@ -62,6 +62,7 @@ void FilesystemWidget::CreateWidgets()
|
||||||
m_tree_view = new QTreeView(this);
|
m_tree_view = new QTreeView(this);
|
||||||
m_tree_view->setModel(m_tree_model);
|
m_tree_view->setModel(m_tree_model);
|
||||||
m_tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
|
m_tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
m_tree_model->setParent(m_tree_view);
|
||||||
|
|
||||||
auto* header = m_tree_view->header();
|
auto* header = m_tree_view->header();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue