Mon, 06 Mar 2017 00:41:13 +0200
Fixed NewPartDialog leaking the memory allocated by the user interface.
src/dialogs/newpartdialog.cpp | file | annotate | diff | comparison | revisions | |
src/dialogs/newpartdialog.h | file | annotate | diff | comparison | revisions |
--- a/src/dialogs/newpartdialog.cpp Mon Mar 06 00:40:23 2017 +0200 +++ b/src/dialogs/newpartdialog.cpp Mon Mar 06 00:41:13 2017 +0200 @@ -42,6 +42,11 @@ ui.useCaLicense->setChecked (configuration().useCaLicense()); } +NewPartDialog::~NewPartDialog() +{ + delete &ui; +} + BfcStatement NewPartDialog::getWinding() const { if (ui.windingCcw->isChecked())
--- a/src/dialogs/newpartdialog.h Mon Mar 06 00:40:23 2017 +0200 +++ b/src/dialogs/newpartdialog.h Mon Mar 06 00:41:13 2017 +0200 @@ -25,7 +25,8 @@ { Q_OBJECT public: - NewPartDialog (QWidget *parent); + NewPartDialog(QWidget *parent); + ~NewPartDialog(); QString author() const; void fillHeader (LDDocument* newdoc) const;