From 3b0f38f24a3c3d7ccadf8c0b0011dfc58c2f9d46 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 26 Oct 2015 06:05:27 -0700 Subject: Fix building without BT support I guess no one had tried this in a while. Signed-off-by: Dirk Hohndel --- qt-ui/configuredivecomputerdialog.cpp | 6 +++++- qt-ui/configuredivecomputerdialog.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp index 7afb3f4bd..ddb9450de 100644 --- a/qt-ui/configuredivecomputerdialog.cpp +++ b/qt-ui/configuredivecomputerdialog.cpp @@ -115,8 +115,12 @@ void GasTypeComboBoxItemDelegate::setModelData(QWidget *editor, QAbstractItemMod ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDialog(parent), config(0), +#ifdef BT_SUPPORT deviceDetails(0), btDeviceSelectionDialog(0) +#else + deviceDetails(0) +#endif { ui.setupUi(this); @@ -134,7 +138,7 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia connect(ui.logToFile, SIGNAL(stateChanged(int)), this, SLOT(checkLogFile(int))); connect(ui.connectButton, SIGNAL(clicked()), this, SLOT(dc_open())); connect(ui.disconnectButton, SIGNAL(clicked()), this, SLOT(dc_close())); -#if BT_SUPPORT +#ifdef BT_SUPPORT connect(ui.bluetoothMode, SIGNAL(clicked(bool)), this, SLOT(selectRemoteBluetoothDevice())); #else ui.bluetoothMode->setVisible(false); diff --git a/qt-ui/configuredivecomputerdialog.h b/qt-ui/configuredivecomputerdialog.h index 7092e9708..be76644a9 100644 --- a/qt-ui/configuredivecomputerdialog.h +++ b/qt-ui/configuredivecomputerdialog.h @@ -8,7 +8,9 @@ #include "configuredivecomputer.h" #include #include +#ifdef BT_SUPPORT #include "btdeviceselectiondialog.h" +#endif class GasSpinBoxItemDelegate : public QStyledItemDelegate { Q_OBJECT @@ -85,7 +87,7 @@ slots: void dc_open(); void dc_close(); -#if BT_SUPPORT +#ifdef BT_SUPPORT void bluetoothSelectionDialogIsFinished(int result); void selectRemoteBluetoothDevice(); #endif @@ -119,7 +121,9 @@ private: QString selected_product; bool fw_upgrade_possible; +#ifdef BT_SUPPORT BtDeviceSelectionDialog *btDeviceSelectionDialog; +#endif }; class OstcFirmwareCheck : QObject { -- cgit v1.2.3-70-g09d2