summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-11-24 09:04:28 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-11-24 16:58:55 -0800
commit160c7c56eff51ac715b4150a2a883b4f7809365f (patch)
tree63400cfb1bcfce4f991642f9d2f687b6ec3576cf /desktop-widgets/configuredivecomputerdialog.cpp
parentad4ea65493afb7f54610b7ddaa28f526f791554f (diff)
downloadsubsurface-160c7c56eff51ac715b4150a2a883b4f7809365f.tar.gz
Fix build without BT support
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/configuredivecomputerdialog.cpp')
-rw-r--r--desktop-widgets/configuredivecomputerdialog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp
index dd9913da4..4f5da16bf 100644
--- a/desktop-widgets/configuredivecomputerdialog.cpp
+++ b/desktop-widgets/configuredivecomputerdialog.cpp
@@ -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()