mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use #if defined() instead of #if
qtcreator (4.3.0) got confused whether BT_SUPPORT was defined. Using work as expected. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
02d3289bbf
commit
f5adbe5662
2 changed files with 7 additions and 7 deletions
|
@ -89,7 +89,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
|
||||||
m_credentialStatus(UNKNOWN),
|
m_credentialStatus(UNKNOWN),
|
||||||
alreadySaving(false)
|
alreadySaving(false)
|
||||||
{
|
{
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
if (localBtDevice.isValid()) {
|
if (localBtDevice.isValid()) {
|
||||||
localBtDevice.powerOn();
|
localBtDevice.powerOn();
|
||||||
QString localDeviceName = "localDevice " + localBtDevice.name() + " is valid, starting discovery";
|
QString localDeviceName = "localDevice " + localBtDevice.name() + " is valid, starting discovery";
|
||||||
|
@ -203,7 +203,7 @@ void QMLManager::mergeLocalRepo()
|
||||||
process_dives(true, false);
|
process_dives(true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
|
|
||||||
extern void addBtUuid(QBluetoothUuid uuid);
|
extern void addBtUuid(QBluetoothUuid uuid);
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ void QMLManager::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
||||||
|
|
||||||
int QMLManager::getVendorIndex()
|
int QMLManager::getVendorIndex()
|
||||||
{
|
{
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
if (!btDCs.isEmpty()) {
|
if (!btDCs.isEmpty()) {
|
||||||
qDebug() << "getVendorIdx" << btDCs.first().vendorIdx;
|
qDebug() << "getVendorIdx" << btDCs.first().vendorIdx;
|
||||||
return btDCs.first().vendorIdx;
|
return btDCs.first().vendorIdx;
|
||||||
|
@ -248,7 +248,7 @@ int QMLManager::getVendorIndex()
|
||||||
|
|
||||||
int QMLManager::getProductIndex()
|
int QMLManager::getProductIndex()
|
||||||
{
|
{
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
if (!btDCs.isEmpty()) {
|
if (!btDCs.isEmpty()) {
|
||||||
qDebug() << "getProductIdx" << btDCs.first().productIdx;
|
qDebug() << "getProductIdx" << btDCs.first().productIdx;
|
||||||
return btDCs.first().productIdx;
|
return btDCs.first().productIdx;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
#include <QBluetoothLocalDevice>
|
#include <QBluetoothLocalDevice>
|
||||||
#include <QBluetoothDeviceDiscoveryAgent>
|
#include <QBluetoothDeviceDiscoveryAgent>
|
||||||
#include <QBluetoothUuid>
|
#include <QBluetoothUuid>
|
||||||
|
@ -122,7 +122,7 @@ public:
|
||||||
Q_INVOKABLE int getVendorIndex();
|
Q_INVOKABLE int getVendorIndex();
|
||||||
Q_INVOKABLE int getProductIndex();
|
Q_INVOKABLE int getProductIndex();
|
||||||
Q_INVOKABLE QString getBtAddress();
|
Q_INVOKABLE QString getBtAddress();
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
void btDeviceDiscovered(const QBluetoothDeviceInfo &device);
|
void btDeviceDiscovered(const QBluetoothDeviceInfo &device);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ private:
|
||||||
bool checkDepth(DiveObjectHelper *myDive, struct dive *d, QString depth);
|
bool checkDepth(DiveObjectHelper *myDive, struct dive *d, QString depth);
|
||||||
bool currentGitLocalOnly;
|
bool currentGitLocalOnly;
|
||||||
bool m_showPin;
|
bool m_showPin;
|
||||||
#if BT_SUPPORT
|
#if defined(BT_SUPPORT)
|
||||||
QBluetoothLocalDevice localBtDevice;
|
QBluetoothLocalDevice localBtDevice;
|
||||||
QBluetoothDeviceDiscoveryAgent *discoveryAgent;
|
QBluetoothDeviceDiscoveryAgent *discoveryAgent;
|
||||||
struct btVendorProduct {
|
struct btVendorProduct {
|
||||||
|
|
Loading…
Add table
Reference in a new issue