[PATCH] Save settings in closeEvent, not destructor

Dirk Hohndel dirk at hohndel.org
Thu Sep 10 09:12:12 PDT 2015


That patch is missing the corresponding change to the .h file...
I'll add it :-)

/D

On Thu, Sep 10, 2015 at 07:30:39AM +0200, Anton Lundin wrote:
> This switches to use the closeEvent to save settings and cleanup instead
> of the destructor.
> 
> Signed-off-by: Anton Lundin <glance at acc.umu.se>
> ---
>  qt-ui/configuredivecomputerdialog.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
> index 04c15b1..e04dcc3 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");
> -- 
> 2.1.4
> 
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


More information about the subsurface mailing list