summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/lowenergyscanner
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/lowenergyscanner')
-rw-r--r--examples/bluetooth/lowenergyscanner/device.cpp6
-rw-r--r--examples/bluetooth/lowenergyscanner/serviceinfo.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/bluetooth/lowenergyscanner/device.cpp b/examples/bluetooth/lowenergyscanner/device.cpp
index 50d51631..00a0ae39 100644
--- a/examples/bluetooth/lowenergyscanner/device.cpp
+++ b/examples/bluetooth/lowenergyscanner/device.cpp
@@ -176,7 +176,7 @@ void Device::connectToService(const QString &uuid)
for (int i = 0; i < m_services.size(); i++) {
ServiceInfo *service = (ServiceInfo*)m_services.at(i);
a = QLowEnergyServiceInfo(service->getLeService());
- if (a.uuid() == u)
+ if (a.serviceUuid() == u)
info->connectToService(a);
}
}
@@ -195,8 +195,8 @@ void Device::serviceConnected(const QLowEnergyServiceInfo &service)
void Device::errorReceived(const QLowEnergyServiceInfo &service)
{
- qDebug() << "Error: " << service.errorString();
- setUpdate(service.errorString());
+ qDebug() << "Error: " << info->errorString() << service.serviceUuid();
+ setUpdate(info->errorString());
}
void Device::setUpdate(QString message)
diff --git a/examples/bluetooth/lowenergyscanner/serviceinfo.cpp b/examples/bluetooth/lowenergyscanner/serviceinfo.cpp
index 471fb40a..d1223bdc 100644
--- a/examples/bluetooth/lowenergyscanner/serviceinfo.cpp
+++ b/examples/bluetooth/lowenergyscanner/serviceinfo.cpp
@@ -59,10 +59,10 @@ QLowEnergyServiceInfo ServiceInfo::getLeService() const
QString ServiceInfo::getName()
{
- return m_serviceLe.name();
+ return m_serviceLe.serviceName();
}
QString ServiceInfo::getUuid()
{
- return m_serviceLe.uuid().toString().remove(QLatin1Char('{')).remove(QLatin1Char('}'));
+ return m_serviceLe.serviceUuid().toString().remove(QLatin1Char('{')).remove(QLatin1Char('}'));
}