computer configuration: pass current filename to dialog

Instead of accessing a global variable, pass the filename
from the MainWindow to the dialog. This is supposed to cut
down on the global variable mess.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-16 09:53:22 +01:00 committed by bstoeger
parent 2e067c89dd
commit 981352646c
3 changed files with 8 additions and 10 deletions

View file

@ -58,7 +58,7 @@ class ConfigureDiveComputerDialog : public QDialog {
Q_OBJECT
public:
explicit ConfigureDiveComputerDialog(QWidget *parent = 0);
explicit ConfigureDiveComputerDialog(const QString &filename, QWidget *parent = 0);
~ConfigureDiveComputerDialog();
private
@ -77,7 +77,6 @@ slots:
void on_restoreBackupButton_clicked();
void on_updateFirmwareButton_clicked();
void on_DiveComputerList_currentRowChanged(int currentRow);
@ -94,6 +93,7 @@ private:
Ui::ConfigureDiveComputerDialog ui;
QString logFile;
QString filename;
void closeEvent(QCloseEvent *event);