From b37dcff2f43e573771d3da89a35aa8e135f1c795 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 4 Jun 2014 10:28:30 +0200 Subject: QBluetoothDeviceInfo::coreConfiguration() should return the QFlag Function name was slightly adjusted to reflect the fact that it's a flag. Change-Id: I9c1a2fe64b93c7ae7bd826d856f8b87f985d7473 Reviewed-by: Lars Knoll Reviewed-by: Alex Blasche --- src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp | 4 ++-- src/bluetooth/qbluetoothdeviceinfo.cpp | 12 ++++++------ src/bluetooth/qbluetoothdeviceinfo.h | 5 +++-- src/bluetooth/qbluetoothdeviceinfo_p.h | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp index fd2c5703..f70c3e64 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp @@ -314,9 +314,9 @@ void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &addres * Low Energy devices do not have property Class. */ if (btClass == 0) - device.setCoreConfiguration(QBluetoothDeviceInfo::LowEnergyCoreConfiguration); + device.setCoreConfigurations(QBluetoothDeviceInfo::LowEnergyCoreConfiguration); else - device.setCoreConfiguration(QBluetoothDeviceInfo::BaseRateCoreConfiguration); + device.setCoreConfigurations(QBluetoothDeviceInfo::BaseRateCoreConfiguration); for (int i = 0; i < discoveredDevices.size(); i++) { if (discoveredDevices[i].address() == device.address()) { if (discoveredDevices[i] == device) { diff --git a/src/bluetooth/qbluetoothdeviceinfo.cpp b/src/bluetooth/qbluetoothdeviceinfo.cpp index 9e6ebaec..d43cbab6 100644 --- a/src/bluetooth/qbluetoothdeviceinfo.cpp +++ b/src/bluetooth/qbluetoothdeviceinfo.cpp @@ -515,25 +515,25 @@ QBluetoothDeviceInfo::DataCompleteness QBluetoothDeviceInfo::serviceUuidsComplet } /*! - Sets the CoreConfiguration of the device to a \a coreConfig. This will help to make a difference + Sets the CoreConfigurations of the device to \a coreConfigs. This will help to make a difference between regular and Low Energy devices. - \sa coreConfiguration() + \sa coreConfigurations() */ -void QBluetoothDeviceInfo::setCoreConfiguration(const CoreConfiguration &coreConfig) +void QBluetoothDeviceInfo::setCoreConfigurations(QBluetoothDeviceInfo::CoreConfigurations coreConfigs) { Q_D(QBluetoothDeviceInfo); - d->deviceCoreConfiguration = coreConfig; + d->deviceCoreConfiguration = coreConfigs; } /*! Returns the configuration of the device. If device configuration is not set, basic rate device configuration will be returned. - \sa setCoreConfiguration() + \sa setCoreConfigurations() */ -QBluetoothDeviceInfo::CoreConfiguration QBluetoothDeviceInfo::coreConfiguration() const +QBluetoothDeviceInfo::CoreConfigurations QBluetoothDeviceInfo::coreConfigurations() const { Q_D(const QBluetoothDeviceInfo); diff --git a/src/bluetooth/qbluetoothdeviceinfo.h b/src/bluetooth/qbluetoothdeviceinfo.h index 2bfc8b55..f2cc1529 100644 --- a/src/bluetooth/qbluetoothdeviceinfo.h +++ b/src/bluetooth/qbluetoothdeviceinfo.h @@ -231,8 +231,9 @@ public: void setServiceUuids(const QList &uuids, DataCompleteness completeness); QList serviceUuids(DataCompleteness *completeness = 0) const; DataCompleteness serviceUuidsCompleteness() const; - void setCoreConfiguration(const CoreConfiguration &coreConfig); - CoreConfiguration coreConfiguration() const; + + void setCoreConfigurations(QBluetoothDeviceInfo::CoreConfigurations coreConfigs); + QBluetoothDeviceInfo::CoreConfigurations coreConfigurations() const; protected: QBluetoothDeviceInfoPrivate *d_ptr; diff --git a/src/bluetooth/qbluetoothdeviceinfo_p.h b/src/bluetooth/qbluetoothdeviceinfo_p.h index d6c63a24..f5e575aa 100644 --- a/src/bluetooth/qbluetoothdeviceinfo_p.h +++ b/src/bluetooth/qbluetoothdeviceinfo_p.h @@ -69,7 +69,7 @@ public: QBluetoothDeviceInfo::DataCompleteness serviceUuidsCompleteness; QList serviceUuids; - QBluetoothDeviceInfo::CoreConfiguration deviceCoreConfiguration; + QBluetoothDeviceInfo::CoreConfigurations deviceCoreConfiguration; }; QT_END_NAMESPACE -- cgit v1.2.3