summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-09-10 07:30:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-10 09:40:04 -0700
commit865c4aedee37fe3e8a8fd0e9ef419891361a30fe (patch)
treea70d262fedb57f4a4ec60a68ee5f7bda5a5827be /qt-ui/configuredivecomputerdialog.cpp
parent404cfec7dc2b772f95cbb802e0c6f39bf499110a (diff)
downloadsubsurface-865c4aedee37fe3e8a8fd0e9ef419891361a30fe.tar.gz
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>
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.cpp')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 04c15b1b4..e04dcc399 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -299,6 +299,10 @@ void OstcFirmwareCheck::saveOstcFirmware(QNetworkReply *reply)
ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog()
{
+}
+
+void ConfigureDiveComputerDialog::closeEvent(QCloseEvent *event)
+{
QSettings settings;
settings.beginGroup("ConfigureDiveComputerDialog");
settings.beginGroup("ostc3GasTable");