diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-09-29 21:41:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-29 14:01:22 -0700 |
commit | 6e24762a6cab33abd34c3d28f47119b0ac25e7e6 (patch) | |
tree | 83040072e330f50b434a143160ca6cc2e022e56a /desktop-widgets/divelogimportdialog.h | |
parent | b80fd26e81d5de5c3b6871a565e8f7449df16bc5 (diff) | |
download | subsurface-6e24762a6cab33abd34c3d28f47119b0ac25e7e6.tar.gz |
Cleanup: Don't leak DiveLogImportDialog objects
The non-modal DiveLogImportDialog was only implicitly deleted when
the MainWindow was destroyed. Instead hook into the accept() and
reject() functions and schedule for deletion with deleteLater().
Quite the horrible proposition, but in line with Qt's object model.
Consider making the dialog modal instead. There seems to be no
upside for this being modal.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelogimportdialog.h')
-rw-r--r-- | desktop-widgets/divelogimportdialog.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/divelogimportdialog.h b/desktop-widgets/divelogimportdialog.h index f01ec282d..a6f2a8868 100644 --- a/desktop-widgets/divelogimportdialog.h +++ b/desktop-widgets/divelogimportdialog.h @@ -89,6 +89,8 @@ slots: void loadFileContents(int value, enum whatChanged triggeredBy); int setup_csv_params(QStringList r, char **params, int pnr); int parseTxtHeader(QString fileName, char **params, int pnr); + void accept() override; + void reject() override; private: bool selector; |