summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_win.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2017-06-01 17:06:24 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2017-06-08 05:08:35 +0000
commitc38583ec73e8490b6373e9ac42503d41b4f28665 (patch)
treefa3676cca5e79feaa6ea5327fd370a3e740997af /src/bluetooth/qlowenergycontroller_win.cpp
parent5c62cfd89db15229fa9a96825c04ad6b6fd08db9 (diff)
Use 'const' keyword a bit more
Change-Id: If735ef8abf793fed46c43f692d413e76013a899e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_win.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_win.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bluetooth/qlowenergycontroller_win.cpp b/src/bluetooth/qlowenergycontroller_win.cpp
index 494d715c..b22e64d1 100644
--- a/src/bluetooth/qlowenergycontroller_win.cpp
+++ b/src/bluetooth/qlowenergycontroller_win.cpp
@@ -615,12 +615,12 @@ void QLowEnergyControllerPrivate::customEvent(QEvent *e)
updateValueOfCharacteristic(characteristicEvent->m_handle,
characteristicEvent->m_value, false);
- QSharedPointer<QLowEnergyServicePrivate> service = serviceForHandle(
+ const QSharedPointer<QLowEnergyServicePrivate> service = serviceForHandle(
characteristicEvent->m_handle);
if (service.isNull())
return;
- QLowEnergyCharacteristic ch(service, characteristicEvent->m_handle);
+ const QLowEnergyCharacteristic ch(service, characteristicEvent->m_handle);
emit service->characteristicChanged(ch, characteristicEvent->m_value);
}
@@ -753,7 +753,7 @@ void QLowEnergyControllerPrivate::discoverServiceDetails(
return;
}
- QSharedPointer<QLowEnergyServicePrivate> servicePrivate =
+ const QSharedPointer<QLowEnergyServicePrivate> servicePrivate =
serviceList.value(service);
int systemErrorCode = NO_ERROR;
@@ -950,7 +950,7 @@ void QLowEnergyControllerPrivate::readCharacteristic(
updateValueOfCharacteristic(charHandle, characteristicValue, false);
- QLowEnergyCharacteristic ch(service, charHandle);
+ const QLowEnergyCharacteristic ch(service, charHandle);
emit service->characteristicRead(ch, characteristicValue);
}
@@ -1004,7 +1004,7 @@ void QLowEnergyControllerPrivate::writeCharacteristic(
updateValueOfCharacteristic(charHandle, newValue, false);
if (mode == QLowEnergyService::WriteWithResponse) {
- QLowEnergyCharacteristic ch(service, charHandle);
+ const QLowEnergyCharacteristic ch(service, charHandle);
emit service->characteristicWritten(ch, newValue);
}
}
@@ -1147,7 +1147,7 @@ void QLowEnergyControllerPrivate::writeDescriptor(
updateValueOfDescriptor(charHandle, descriptorHandle, newValue, false);
- QLowEnergyDescriptor dscr(service, charHandle, descriptorHandle);
+ const QLowEnergyDescriptor dscr(service, charHandle, descriptorHandle);
emit service->descriptorWritten(dscr, newValue);
}