mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:13:24 +00:00
Fix abort when Bluetooth mode is default
Commitdec47e11cd
introduces a SIGSEGV in case the user has Bluetooth download selected from its previous sessions. Accessing the "Import from dive computer" crashes immediately. Reverting a small part of commitdec47e11cd
solves this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
057f46f854
commit
84b1b63d46
1 changed files with 2 additions and 4 deletions
|
@ -70,10 +70,6 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
|
|||
connect(timer, SIGNAL(timeout()), this, SLOT(updateProgressBar()));
|
||||
connect(close, SIGNAL(activated()), this, SLOT(close()));
|
||||
connect(quit, SIGNAL(activated()), parent, SLOT(close()));
|
||||
#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
|
||||
connect(ui.bluetoothMode, SIGNAL(stateChanged(int)), this, SLOT(enableBluetoothMode(int)));
|
||||
connect(ui.chooseBluetoothDevice, SIGNAL(clicked()), this, SLOT(selectRemoteBluetoothDevice()));
|
||||
#endif
|
||||
|
||||
auto dc = SettingsObjectWrapper::instance()->dive_computer_settings;
|
||||
if (!dc->dc_vendor().isEmpty()) {
|
||||
|
@ -95,6 +91,8 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
|
|||
ui.bluetoothMode->setText(tr("Choose Bluetooth download mode"));
|
||||
ui.bluetoothMode->setChecked(dc->downloadMode() == DC_TRANSPORT_BLUETOOTH);
|
||||
btDeviceSelectionDialog = 0;
|
||||
connect(ui.bluetoothMode, SIGNAL(stateChanged(int)), this, SLOT(enableBluetoothMode(int)));
|
||||
connect(ui.chooseBluetoothDevice, SIGNAL(clicked()), this, SLOT(selectRemoteBluetoothDevice()));
|
||||
ui.chooseBluetoothDevice->setEnabled(ui.bluetoothMode->isChecked());
|
||||
#else
|
||||
ui.bluetoothMode->hide();
|
||||
|
|
Loading…
Add table
Reference in a new issue