Save settings in closeEvent, not destructor

This switches to use the closeEvent to save settings and cleanup instead
of the destructor.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2015-09-10 07:30:39 +02:00 committed by Dirk Hohndel
parent 404cfec7dc
commit 865c4aedee
2 changed files with 7 additions and 0 deletions

View file

@ -298,6 +298,10 @@ void OstcFirmwareCheck::saveOstcFirmware(QNetworkReply *reply)
}
ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog()
{
}
void ConfigureDiveComputerDialog::closeEvent(QCloseEvent *event)
{
QSettings settings;
settings.beginGroup("ConfigureDiveComputerDialog");

View file

@ -56,6 +56,9 @@ public:
explicit ConfigureDiveComputerDialog(QWidget *parent = 0);
~ConfigureDiveComputerDialog();
protected:
void closeEvent(QCloseEvent *event);
private
slots:
void checkLogFile(int state);