From cdc3ee8b00380ad208561e6c9bf575762fa398fb Mon Sep 17 00:00:00 2001 From: Nedim Hadzic Date: Wed, 19 Feb 2014 15:59:53 +0100 Subject: Renaming QLowEnergyServiceInfo methods Ensures that QLowEnergyServiceInfo and QBluetoothServiceInfo are more alike. Tests and examples updated as well. Change-Id: I0f6a97900891a9673f99578bdc8d156a8c403513 Reviewed-by: Alex Blasche --- examples/bluetooth/lowenergyscanner/device.cpp | 6 +++--- examples/bluetooth/lowenergyscanner/serviceinfo.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/bluetooth/lowenergyscanner') 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('}')); } -- cgit v1.2.3