diff options
| author | Diana <iaz3@users.noreply.github.com> | 2018-05-18 07:45:13 -0400 |
|---|---|---|
| committer | Diana <iaz3@users.noreply.github.com> | 2018-05-18 07:45:13 -0400 |
| commit | 6617be8ef9a015dd4109729155fc9a772997b5ed (patch) | |
| tree | ab024e4423c898fa94ce2eeceba3d29f7977433a /src/mainwindow.h | |
| parent | 5a5bfee7126313608d37d533ea98bca9489fa5dc (diff) | |
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.
Diffstat (limited to 'src/mainwindow.h')
| -rw-r--r-- | src/mainwindow.h | 2 |
1 files changed, 2 insertions, 0 deletions
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;
|
