summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-05-20 12:49:44 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2016-05-23 05:58:18 +0000
commit7393531856058a8a0fe440d3a64728248958ac81 (patch)
tree1a2723b0ecc1387fe073696460afc9cb2e1dc428
parent6909acfd09de1ab56075efcc82c1937cbdfd6470 (diff)
QtBluetooth (iOS) - fix potential linker errorsv5.6.1-1v5.6.1
Bluetooth on iOS needs some of 'default' (or 'dummy') implementations, but does not want warnings like 'Dummy backend running', as it's not really dummy. Also, having printDummyWarning calls can end-up in a linker error since we do not build dummy_helper.cpp on iOS. The solution is to ifndef all these calls/includes. Change-Id: I9c64f2bacbc6134ed30d75f85f9df0194add418d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp4
-rw-r--r--src/bluetooth/qbluetoothlocaldevice_p.cpp4
-rw-r--r--src/bluetooth/qbluetoothserver_p.cpp4
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_p.cpp4
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_p.cpp4
-rw-r--r--src/bluetooth/qbluetoothsocket_p.cpp4
-rw-r--r--src/bluetooth/qlowenergycontroller_p.cpp4
7 files changed, 28 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
index 963eb368..81e57881 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
@@ -36,7 +36,9 @@
#include "qbluetoothaddress.h"
#include "qbluetoothuuid.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
#define QT_DEVICEDISCOVERY_DEBUG
@@ -50,7 +52,9 @@ QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate(
q_ptr(parent)
{
Q_UNUSED(deviceAdapter);
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
}
QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate()
diff --git a/src/bluetooth/qbluetoothlocaldevice_p.cpp b/src/bluetooth/qbluetoothlocaldevice_p.cpp
index 20c02558..dff24509 100644
--- a/src/bluetooth/qbluetoothlocaldevice_p.cpp
+++ b/src/bluetooth/qbluetoothlocaldevice_p.cpp
@@ -35,7 +35,9 @@
#include "qbluetoothaddress.h"
#include "qbluetoothlocaldevice_p.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -43,7 +45,9 @@ QBluetoothLocalDevice::QBluetoothLocalDevice(QObject *parent) :
QObject(parent),
d_ptr(0)
{
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
registerQBluetoothLocalDeviceMetaType();
}
diff --git a/src/bluetooth/qbluetoothserver_p.cpp b/src/bluetooth/qbluetoothserver_p.cpp
index 4f9ce433..318042f9 100644
--- a/src/bluetooth/qbluetoothserver_p.cpp
+++ b/src/bluetooth/qbluetoothserver_p.cpp
@@ -34,14 +34,18 @@
#include "qbluetoothserver.h"
#include "qbluetoothserver_p.h"
#include "qbluetoothsocket.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
QT_BEGIN_NAMESPACE
QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType)
: maxPendingConnections(1), serverType(sType), m_lastError(QBluetoothServer::NoError)
{
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
if (sType == QBluetoothServiceInfo::RfcommProtocol)
socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
else
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_p.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_p.cpp
index 263e9018..e4561492 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_p.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_p.cpp
@@ -33,7 +33,9 @@
#include "qbluetoothservicediscoveryagent.h"
#include "qbluetoothservicediscoveryagent_p.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -42,7 +44,9 @@ QBluetoothServiceDiscoveryAgentPrivate::QBluetoothServiceDiscoveryAgentPrivate(c
deviceDiscoveryAgent(0), mode(QBluetoothServiceDiscoveryAgent::MinimalDiscovery),
singleDevice(false)
{
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
Q_UNUSED(deviceAdapter);
}
diff --git a/src/bluetooth/qbluetoothserviceinfo_p.cpp b/src/bluetooth/qbluetoothserviceinfo_p.cpp
index dbf3abfc..1e10b7a3 100644
--- a/src/bluetooth/qbluetoothserviceinfo_p.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_p.cpp
@@ -33,13 +33,17 @@
#include "qbluetoothserviceinfo.h"
#include "qbluetoothserviceinfo_p.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
QT_BEGIN_NAMESPACE
QBluetoothServiceInfoPrivate::QBluetoothServiceInfoPrivate()
{
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
}
QBluetoothServiceInfoPrivate::~QBluetoothServiceInfoPrivate()
diff --git a/src/bluetooth/qbluetoothsocket_p.cpp b/src/bluetooth/qbluetoothsocket_p.cpp
index 6b196a81..ca6275d0 100644
--- a/src/bluetooth/qbluetoothsocket_p.cpp
+++ b/src/bluetooth/qbluetoothsocket_p.cpp
@@ -33,7 +33,9 @@
#include "qbluetoothsocket.h"
#include "qbluetoothsocket_p.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -44,7 +46,9 @@ QBluetoothSocketPrivate::QBluetoothSocketPrivate()
socketError(QBluetoothSocket::NoSocketError),
secFlags(QBluetooth::NoSecurity)
{
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
}
QBluetoothSocketPrivate::~QBluetoothSocketPrivate()
diff --git a/src/bluetooth/qlowenergycontroller_p.cpp b/src/bluetooth/qlowenergycontroller_p.cpp
index 9cbc6633..328bdb64 100644
--- a/src/bluetooth/qlowenergycontroller_p.cpp
+++ b/src/bluetooth/qlowenergycontroller_p.cpp
@@ -32,7 +32,9 @@
****************************************************************************/
#include "qlowenergycontroller_p.h"
+#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
+#endif
QT_BEGIN_NAMESPACE
@@ -41,7 +43,9 @@ QLowEnergyControllerPrivate::QLowEnergyControllerPrivate()
state(QLowEnergyController::UnconnectedState),
error(QLowEnergyController::NoError)
{
+#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
+#endif
registerQLowEnergyControllerMetaType();
}