Skip to content

Commit

Permalink
DolphinQt: Fix memory lkea in FilesystemWidget
Browse files Browse the repository at this point in the history
QTreeView::setModel doesn't transfer ownership of the object.

Setting the parent resolves this
  • Loading branch information
mackal committed Apr 4, 2023
1 parent b63b574 commit 2dca242
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Core/DolphinQt/Config/FilesystemWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void FilesystemWidget::CreateWidgets()
m_tree_view = new QTreeView(this);
m_tree_view->setModel(m_tree_model);
m_tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
m_tree_model->setParent(m_tree_view);

auto* header = m_tree_view->header();

Expand Down

0 comments on commit 2dca242

Please sign in to comment.