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>
This commit is contained in:
Berthold Stoeger 2018-09-29 21:41:37 +02:00 committed by Dirk Hohndel
parent b80fd26e81
commit 6e24762a6c
2 changed files with 18 additions and 0 deletions

View file

@ -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;