fix: memory leak, set parent so it's in tree to get cleaned up.

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2023-05-21 01:49:13 -07:00
parent 7983977156
commit 6b8fe283f0

View File

@ -165,7 +165,7 @@ VersionPage::VersionPage(MinecraftInstance *inst, QWidget *parent)
auto proxy = new IconProxy(ui->packageView); auto proxy = new IconProxy(ui->packageView);
proxy->setSourceModel(m_profile.get()); proxy->setSourceModel(m_profile.get());
m_filterModel = new QSortFilterProxyModel(); m_filterModel = new QSortFilterProxyModel(this);
m_filterModel->setDynamicSortFilter(true); m_filterModel->setDynamicSortFilter(true);
m_filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive); m_filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
m_filterModel->setSortCaseSensitivity(Qt::CaseInsensitive); m_filterModel->setSortCaseSensitivity(Qt::CaseInsensitive);