summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartlistener
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-07-18 15:16:42 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-07-23 12:13:21 +0200
commit45536c645baa22e51be4871308ff872c1ba43dce (patch)
tree9d0119b3c2587773034141bcc1537a9661b8eeb6 /examples/bluetooth/heartlistener
parentb38d9e348470d917dba9d7b8acfc93fb505a6555 (diff)
Rename QLowEnergyControllerNew -> QLowEnergyController
Moves the new API into its place and completes the removal of the old API. Change-Id: I10a285e24e288aeb747cb1606574e27a4bf57308 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'examples/bluetooth/heartlistener')
-rw-r--r--examples/bluetooth/heartlistener/heartrate.cpp8
-rw-r--r--examples/bluetooth/heartlistener/heartrate.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/bluetooth/heartlistener/heartrate.cpp b/examples/bluetooth/heartlistener/heartrate.cpp
index f0f4230e..7ada09dd 100644
--- a/examples/bluetooth/heartlistener/heartrate.cpp
+++ b/examples/bluetooth/heartlistener/heartrate.cpp
@@ -144,14 +144,14 @@ void HeartRate::connectToService(const QString &address)
}
//! [Connect signals]
- m_control = new QLowEnergyControllerNew(m_currentDevice.getDevice().address(),
+ m_control = new QLowEnergyController(m_currentDevice.getDevice().address(),
this);
connect(m_control, SIGNAL(serviceDiscovered(QBluetoothUuid)),
this, SLOT(serviceDiscovered(QBluetoothUuid)));
connect(m_control, SIGNAL(discoveryFinished()),
this, SLOT(serviceScanDone()));
- connect(m_control, SIGNAL(error(QLowEnergyControllerNew::Error)),
- this, SLOT(controllerError(QLowEnergyControllerNew::Error)));
+ connect(m_control, SIGNAL(error(QLowEnergyController::Error)),
+ this, SLOT(controllerError(QLowEnergyController::Error)));
connect(m_control, SIGNAL(connected()),
this, SLOT(serviceConnected()));
@@ -232,7 +232,7 @@ void HeartRate::disconnectService()
}
//! [Error handling]
-void HeartRate::controllerError(QLowEnergyControllerNew::Error error)
+void HeartRate::controllerError(QLowEnergyController::Error error)
{
setMessage("Cannot connect to remote device.");
qWarning() << "Controller Error:" << error;
diff --git a/examples/bluetooth/heartlistener/heartrate.h b/examples/bluetooth/heartlistener/heartrate.h
index 25ee8e01..65e92af8 100644
--- a/examples/bluetooth/heartlistener/heartrate.h
+++ b/examples/bluetooth/heartlistener/heartrate.h
@@ -51,7 +51,7 @@
#include <QTimer>
#include <QBluetoothDeviceDiscoveryAgent>
#include <QBluetoothDeviceInfo>
-#include <QLowEnergyControllerNew>
+#include <QLowEnergyController>
#include <QLowEnergyService>
@@ -99,10 +99,10 @@ private slots:
void scanFinished();
void deviceScanError(QBluetoothDeviceDiscoveryAgent::Error);
- //QLowEnergyControllerNew
+ //QLowEnergyController
void serviceDiscovered(const QBluetoothUuid &);
void serviceScanDone();
- void controllerError(QLowEnergyControllerNew::Error);
+ void controllerError(QLowEnergyController::Error);
void serviceConnected();
void deviceDisconnected();
@@ -141,7 +141,7 @@ private:
int m_max;
int m_min;
float calories;
- QLowEnergyControllerNew *m_control;
+ QLowEnergyController *m_control;
QTimer *timer; // for demo application
QLowEnergyService *m_service;
};