summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/bluetoothdevice.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2017-02-14 14:02:06 +0100
committerKari Hautamäki <kari.hautamaki@qt.io>2017-02-14 14:06:50 +0000
commit261d5018ac2990acc4739895e29f86c8d94b62a5 (patch)
tree0d833baa77705d1afe1ffe2161c2d0ebff1a240e /tradeshow/iot-sensortag/bluetoothdevice.cpp
parentcc73478e1ff48a6e469d3856c552e7a5e3d5023d (diff)
iot-sensortag: Remove m_characteristics
m_characteristics and related functions and signals are not used anywhere so they can be removed. Change-Id: I0e5e0808be4b308687a806ea43492c251d9122f8 Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/bluetoothdevice.cpp')
-rw-r--r--tradeshow/iot-sensortag/bluetoothdevice.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/tradeshow/iot-sensortag/bluetoothdevice.cpp b/tradeshow/iot-sensortag/bluetoothdevice.cpp
index ba9aa55..4fe7ea7 100644
--- a/tradeshow/iot-sensortag/bluetoothdevice.cpp
+++ b/tradeshow/iot-sensortag/bluetoothdevice.cpp
@@ -100,8 +100,6 @@ BluetoothDevice::~BluetoothDevice()
{
delete discoveryAgent;
delete controller;
- qDeleteAll(m_characteristics);
- m_characteristics.clear();
}
QString BluetoothDevice::getAddress() const
{
@@ -119,17 +117,8 @@ QString BluetoothDevice::getName() const
return m_deviceInfo.name();
}
-QVariant BluetoothDevice::getCharacteristics()
-{
- return QVariant::fromValue(m_characteristics);
-}
-
void BluetoothDevice::scanServices()
{
- qDeleteAll(m_characteristics);
- m_characteristics.clear();
- emit characteristicsUpdated();
-
statusUpdated("(Connecting to device...)");
if (controller && m_previousAddress != getAddress()) {
@@ -589,34 +578,6 @@ void BluetoothDevice::deviceDisconnected()
setState(BluetoothDevice::Disconnected);
}
-void BluetoothDevice::serviceDetailsDiscovered(QLowEnergyService::ServiceState newState)
-{
- if (newState != QLowEnergyService::ServiceDiscovered) {
- // do not hang in "Scanning for characteristics" mode forever
- // in case the service discovery failed
- // We have to queue the signal up to give UI time to even enter
- // the above mode
- if (newState != QLowEnergyService::DiscoveringServices) {
- QMetaObject::invokeMethod(this, "characteristicsUpdated",
- Qt::QueuedConnection);
- }
- return;
- }
-
- QLowEnergyService *service = qobject_cast<QLowEnergyService *>(sender());
- if (!service)
- return;
-
-
- const QList<QLowEnergyCharacteristic> chars = service->characteristics();
- foreach (const QLowEnergyCharacteristic &ch, chars) {
- CharacteristicInfo *cInfo = new CharacteristicInfo(ch);
- m_characteristics.append(cInfo);
- }
-
- emit characteristicsUpdated();
-}
-
BluetoothDevice::DeviceState BluetoothDevice::state() const
{
return m_deviceState;