summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergydescriptor.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-06-26 16:31:51 +0200
committerAlex Blasche <alexander.blasche@digia.com>2014-07-02 16:17:06 +0200
commitbdf895b5fffe8c79c2b1d60b7cad8f8b1ffa72b4 (patch)
tree6778bb6d5b4a535164c2817c2a645b19f5e4af10 /src/bluetooth/qlowenergydescriptor.cpp
parentd24e8a19cbc943af5d4dfd062cddde04eee2ff87 (diff)
Add a few minor code cleanups pointed out by previous patch reviews.
Change-Id: Ib8cec835bf6bfea074060104a3746485c4dbe606 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/bluetooth/qlowenergydescriptor.cpp')
-rw-r--r--src/bluetooth/qlowenergydescriptor.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bluetooth/qlowenergydescriptor.cpp b/src/bluetooth/qlowenergydescriptor.cpp
index 5987d91d..2a429a1a 100644
--- a/src/bluetooth/qlowenergydescriptor.cpp
+++ b/src/bluetooth/qlowenergydescriptor.cpp
@@ -66,7 +66,7 @@ struct QLowEnergyDescriptorPrivate
};
/*!
- Destroys the QLowEnergyDescriptor object.
+ Construct a new QLowEnergyDescriptor.
*/
QLowEnergyDescriptor::QLowEnergyDescriptor():
d_ptr(0), data(0)
@@ -167,8 +167,9 @@ QBluetoothUuid QLowEnergyDescriptor::uuid() const
if (d_ptr.isNull() || !data
|| !d_ptr->characteristicList.contains(data->charHandle)
|| !d_ptr->characteristicList[data->charHandle].
- descriptorList.contains(data->descHandle))
+ descriptorList.contains(data->descHandle)) {
return QBluetoothUuid::UnknownDescriptorType;
+ }
return d_ptr->characteristicList[data->charHandle].descriptorList[data->descHandle].uuid;
}
@@ -192,8 +193,9 @@ QByteArray QLowEnergyDescriptor::value() const
if (d_ptr.isNull() || !data
|| !d_ptr->characteristicList.contains(data->charHandle)
|| !d_ptr->characteristicList[data->charHandle].
- descriptorList.contains(data->descHandle))
+ descriptorList.contains(data->descHandle)) {
return QByteArray();
+ }
return d_ptr->characteristicList[data->charHandle].descriptorList[data->descHandle].value;
}