From 84b1b63d46e4868808cc8dbd1c4fef8078ddcb16 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Sun, 28 May 2017 12:29:26 +0200 Subject: 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 --- desktop-widgets/downloadfromdivecomputer.cpp | 6 ++---- 1 file 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(); -- cgit v1.2.3-70-g09d2