summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycharacteristicdata.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-04 16:07:43 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-09 16:25:40 +0000
commit547c931904e5251fe79413ba933506a88df0fbbb (patch)
tree896896dc03feb6ede09ce7ea3eab5fdfe0fae209 /src/bluetooth/qlowenergycharacteristicdata.cpp
parenta56a776d4199568657f10248d387c87e40c508fc (diff)
Bluetooth LE: Fix two list setter functions.
Adding the new list elements is all well and nice, but we have to clear the existing ones first. Change-Id: I1b044f2ea86a4a300bde93535a944c18328aa805 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergycharacteristicdata.cpp')
-rw-r--r--src/bluetooth/qlowenergycharacteristicdata.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycharacteristicdata.cpp b/src/bluetooth/qlowenergycharacteristicdata.cpp
index 03f61762..9e0d69ad 100644
--- a/src/bluetooth/qlowenergycharacteristicdata.cpp
+++ b/src/bluetooth/qlowenergycharacteristicdata.cpp
@@ -156,6 +156,7 @@ QList<QLowEnergyDescriptorData> QLowEnergyCharacteristicData::descriptors() cons
*/
void QLowEnergyCharacteristicData::setDescriptors(const QList<QLowEnergyDescriptorData> &descriptors)
{
+ d->descriptors.clear();
foreach (const QLowEnergyDescriptorData &desc, descriptors)
addDescriptor(desc);
}