Commit d2783df3 authored by David Hallas's avatar David Hallas

Fixes memory leak of KItemListHeader

Summary:
Fixes memory leak of KItemListHeader
The KItemListHeader passed the listView parent object to the QObject
base class, but that pointer seems to always be nullptr causing the
KItemListHeader to not be memory managed by anything. Instead simple
use the listView as parent pointer.

Test Plan: This leak was found using Address Sanitizer

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14453
parent 16edd9cc
......@@ -74,7 +74,7 @@ qreal KItemListHeader::preferredColumnWidth(const QByteArray& role) const
}
KItemListHeader::KItemListHeader(KItemListView* listView) :
QObject(listView->parent()),
QObject(listView),
m_view(listView)
{
m_headerWidget = m_view->m_headerWidget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment