From 6617be8ef9a015dd4109729155fc9a772997b5ed Mon Sep 17 00:00:00 2001 From: Diana Date: Fri, 18 May 2018 07:45:13 -0400 Subject: Fix a memory leak in updateToolBar updateToolBar was creating new QActions and QWidgets every call, without cleaning them up. The spacer, help widgets, and toolbuttons only need to be created once. Those have been moved out into the MainWindow constructor updateToolBar is called in various places, importantly when adding/removing executable shortcuts. Also adds a deleteLater() call to clean up executable shortcut actions. --- src/mainwindow.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainwindow.h') diff --git a/src/mainwindow.h b/src/mainwindow.h index bbff0d93..02094344 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -304,6 +304,8 @@ private: Ui::MainWindow *ui; + QAction *m_Sep; // Executable Shortcuts are added after this. Non owning. + bool m_WasVisible; MOBase::TutorialControl m_Tutorial; -- cgit v1.3.1