Bluetooth cleanup: remove pointless download_mode

This was used to track whether we had selected the native BT mode in the
download dialog. But the information is redundant as we can tell from the
device name whether this is a BT/BLE download or not.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-10-15 07:40:26 -04:00 committed by bstoeger
parent 5b925d29af
commit a20626a874
4 changed files with 1 additions and 17 deletions

View file

@ -94,7 +94,7 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
QString deviceText = qPrefDiveComputer::device();
#if defined(BT_SUPPORT)
ui.bluetoothMode->setText(tr("Choose Bluetooth download mode"));
ui.bluetoothMode->setChecked(qPrefDiveComputer::download_mode() == DC_TRANSPORT_BLUETOOTH);
ui.bluetoothMode->setChecked(isBluetoothAddress(qPrefDiveComputer::device()));
btDeviceSelectionDialog = 0;
connect(ui.bluetoothMode, SIGNAL(stateChanged(int)), this, SLOT(enableBluetoothMode(int)));
connect(ui.chooseBluetoothDevice, SIGNAL(clicked()), this, SLOT(selectRemoteBluetoothDevice()));
@ -398,10 +398,6 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked()
qPrefDiveComputer::set_product(data->product());
qPrefDiveComputer::set_device(data->devName());
#if defined(BT_SUPPORT)
qPrefDiveComputer::set_download_mode(ui.bluetoothMode->isChecked() ? DC_TRANSPORT_BLUETOOTH : DC_TRANSPORT_SERIAL);
#endif
// before we start, remember where the dive_table ended
previousLast = dive_table.nr;
thread.start();