mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:43:23 +00:00
Make compile succeed without BT_SUPPORT
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7aacaf60da
commit
56c82081a5
4 changed files with 9 additions and 14 deletions
|
@ -21,17 +21,16 @@ endif()
|
|||
if(BTSUPPORT)
|
||||
add_definitions(-DBT_SUPPORT)
|
||||
set(BT_SRC_FILES desktop-widgets/btdeviceselectiondialog.cpp)
|
||||
set(BT_CORE_SRC_FILES qtserialbluetooth.cpp)
|
||||
set(BT_CORE_SRC_FILES qtserialbluetooth.cpp btdiscovery.cpp)
|
||||
endif()
|
||||
|
||||
if(BLESUPPORT)
|
||||
add_definitions(-DBLE_SUPPORT)
|
||||
set(BT_CORE_SRC_FILES qt-ble.cpp)
|
||||
set(BT_CORE_SRC_FILES ${BT_CORE_SRC_FILES} qt-ble.cpp)
|
||||
endif()
|
||||
|
||||
# compile the core library, in C.
|
||||
set(SUBSURFACE_CORE_LIB_SRCS
|
||||
btdiscovery.cpp
|
||||
cochran.c
|
||||
datatrak.c
|
||||
deco.c
|
||||
|
|
|
@ -6,13 +6,11 @@
|
|||
#include <QString>
|
||||
#include <QLoggingCategory>
|
||||
#include <QAbstractListModel>
|
||||
#if defined(BT_SUPPORT)
|
||||
#include <QBluetoothLocalDevice>
|
||||
#include <QBluetoothDeviceDiscoveryAgent>
|
||||
#include <QBluetoothUuid>
|
||||
#include "core/libdivecomputer.h"
|
||||
|
||||
#endif
|
||||
#if defined(Q_OS_ANDROID)
|
||||
#include <QAndroidJniObject>
|
||||
#include <QAndroidJniEnvironment>
|
||||
|
@ -29,7 +27,6 @@ public:
|
|||
~BTDiscovery();
|
||||
static BTDiscovery *instance();
|
||||
|
||||
#if defined(BT_SUPPORT)
|
||||
struct btPairedDevice {
|
||||
QString address;
|
||||
QString name;
|
||||
|
@ -49,28 +46,25 @@ public:
|
|||
void getBluetoothDevices();
|
||||
#endif
|
||||
QList<btVendorProduct> getBtDcs();
|
||||
#endif
|
||||
|
||||
private:
|
||||
static BTDiscovery *m_instance;
|
||||
bool m_btValid;
|
||||
#if defined(BT_SUPPORT)
|
||||
|
||||
QList<struct btVendorProduct> btDCs; // recognized DCs
|
||||
QList<struct btVendorProduct> btAllDevices; // all paired BT stuff
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
bool checkException(const char* method, const QAndroidJniObject* obj);
|
||||
#endif
|
||||
|
||||
#if defined(BT_SUPPORT)
|
||||
QList<struct btPairedDevice> btPairedDevices;
|
||||
QBluetoothLocalDevice localBtDevice;
|
||||
QBluetoothDeviceDiscoveryAgent *discoveryAgent;
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void dcVendorChanged();
|
||||
void dcProductChanged();
|
||||
void dcBtChanged();
|
||||
};
|
||||
|
||||
#endif // BTDISCOVERY_H
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
#include "dive.h"
|
||||
#include "libdivecomputer.h"
|
||||
#include "connectionlistmodel.h"
|
||||
#if BT_SUPPORT
|
||||
#include "core/btdiscovery.h"
|
||||
|
||||
#endif
|
||||
/* Helper object for access of Device Data in QML */
|
||||
class DCDeviceData : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -100,5 +101,4 @@ extern QStringList vendorList;
|
|||
extern QHash<QString, QStringList> productList;
|
||||
extern QMap<QString, dc_descriptor_t *> descriptorLookup;
|
||||
extern ConnectionListModel connectionListModel;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#include <QElapsedTimer>
|
||||
#include <QColor>
|
||||
|
||||
#if BT_SUPPORT
|
||||
#include "core/btdiscovery.h"
|
||||
#endif
|
||||
#include "core/gpslocation.h"
|
||||
#include "core/downloadfromdcthread.h"
|
||||
#include "qt-models/divelistmodel.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue