summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-05-28 12:29:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-28 03:53:05 -0700
commit84b1b63d46e4868808cc8dbd1c4fef8078ddcb16 (patch)
treef148ab926b228384dd1ee1f2cf4ad73a9d27a65d /desktop-widgets/downloadfromdivecomputer.cpp
parent057f46f854e542276fe1c7c7589cd910cccef532 (diff)
downloadsubsurface-84b1b63d46e4868808cc8dbd1c4fef8078ddcb16.tar.gz
Fix abort when Bluetooth mode is default
Commit dec47e11cd3 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 commit dec47e11cd3 solves this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.cpp')
-rw-r--r--desktop-widgets/downloadfromdivecomputer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp
index e935dec6e..2d834359e 100644
--- a/desktop-widgets/downloadfromdivecomputer.cpp
+++ b/desktop-widgets/downloadfromdivecomputer.cpp
@@ -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();