Skip to content

Commit

Permalink
Properly set parent of sidebar delegate
Browse files Browse the repository at this point in the history
To avoid asan reporting a memory leak here.
  • Loading branch information
askmeaboutlo0m committed Sep 21, 2023
1 parent e4868ae commit a15a71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/thinsrv/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a15a71b

Please sign in to comment.