From a15a71b9f2d4cac77fcf7289f1a8a89207be97aa Mon Sep 17 00:00:00 2001 From: askmeaboutloom Date: Thu, 21 Sep 2023 08:44:05 +0200 Subject: [PATCH] Properly set parent of sidebar delegate To avoid asan reporting a memory leak here. --- src/thinsrv/gui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thinsrv/gui/mainwindow.cpp b/src/thinsrv/gui/mainwindow.cpp index cabdcbadc3..0610ca6674 100644 --- a/src/thinsrv/gui/mainwindow.cpp +++ b/src/thinsrv/gui/mainwindow.cpp @@ -69,7 +69,7 @@ MainWindow::MainWindow(Server *serverConnection, QWidget *parent) sidebar->setFocusPolicy(Qt::NoFocus); sidebar->setFrameShape(QFrame::NoFrame); sidebar->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - sidebar->setItemDelegate(new SidebarItemDelegate); + sidebar->setItemDelegate(new SidebarItemDelegate{this}); sidebar->setExpandsOnDoubleClick(false); QPalette sidebarPalette = sidebar->palette(); sidebarPalette.setColor(QPalette::Base, sidebarPalette.color(QPalette::Window));