mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix build without BT support
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ad4ea65493
commit
160c7c56ef
1 changed files with 6 additions and 0 deletions
|
@ -904,8 +904,12 @@ void ConfigureDiveComputerDialog::configError(QString err)
|
|||
|
||||
void ConfigureDiveComputerDialog::getDeviceData()
|
||||
{
|
||||
#ifdef BT_SUPPORT
|
||||
QString device = ui.bluetoothMode && btDeviceSelectionDialog ?
|
||||
btDeviceSelectionDialog->getSelectedDeviceAddress() : ui.device->currentText();
|
||||
#else
|
||||
QString device = ui.device->currentText();
|
||||
#endif
|
||||
device_data.devname = strdup(device.toUtf8().data());
|
||||
device_data.vendor = strdup(selected_vendor.toUtf8().data());
|
||||
device_data.product = strdup(selected_product.toUtf8().data());
|
||||
|
@ -915,8 +919,10 @@ void ConfigureDiveComputerDialog::getDeviceData()
|
|||
|
||||
auto dc = SettingsObjectWrapper::instance()->dive_computer_settings;
|
||||
dc->setDevice(device_data.devname);
|
||||
#ifdef BT_SUPPORT
|
||||
if (ui.bluetoothMode && btDeviceSelectionDialog)
|
||||
dc->setDeviceName(btDeviceSelectionDialog->getSelectedDeviceName());
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConfigureDiveComputerDialog::on_cancel_clicked()
|
||||
|
|
Loading…
Add table
Reference in a new issue