summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java2
-rw-r--r--src/bluetooth/android/lowenergynotificationhub_p.h4
-rw-r--r--src/bluetooth/qlowenergycontroller.cpp2
-rw-r--r--src/bluetooth/qlowenergycontroller_android.cpp18
4 files changed, 13 insertions, 13 deletions
diff --git a/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java b/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java
index d256fe8c..76b738bd 100644
--- a/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java
+++ b/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java
@@ -108,7 +108,7 @@ public class QtBluetoothLEServer {
{
@Override
public void onConnectionStateChange(BluetoothDevice device, int status, int newState) {
- Log.w(TAG, "Our gatt server connection state changed, new state: " + Integer.toString(newState));
+ Log.w(TAG, "Our gatt server connection state changed, new state: " + newState);
super.onConnectionStateChange(device, status, newState);
int qtControllerState = 0;
diff --git a/src/bluetooth/android/lowenergynotificationhub_p.h b/src/bluetooth/android/lowenergynotificationhub_p.h
index 7a328204..4a384a8c 100644
--- a/src/bluetooth/android/lowenergynotificationhub_p.h
+++ b/src/bluetooth/android/lowenergynotificationhub_p.h
@@ -122,9 +122,9 @@ signals:
QLowEnergyService::ServiceError errorCode);
void descriptorWritten(int descHandle, const QByteArray &data,
QLowEnergyService::ServiceError errorCode);
- void serverDescriptorWritten(const QAndroidJniObject &descriptor, const QByteArray newValue);
+ void serverDescriptorWritten(const QAndroidJniObject &descriptor, const QByteArray &newValue);
void characteristicChanged(int charHandle, const QByteArray &data);
- void serverCharacteristicChanged(const QAndroidJniObject& characteristic, const QByteArray& newValue);
+ void serverCharacteristicChanged(const QAndroidJniObject &characteristic, const QByteArray &newValue);
void serviceError(int attributeHandle, QLowEnergyService::ServiceError errorCode);
void advertisementError(int status);
diff --git a/src/bluetooth/qlowenergycontroller.cpp b/src/bluetooth/qlowenergycontroller.cpp
index 6a9b50a0..a3aad282 100644
--- a/src/bluetooth/qlowenergycontroller.cpp
+++ b/src/bluetooth/qlowenergycontroller.cpp
@@ -359,7 +359,7 @@ void QLowEnergyControllerPrivate::invalidateServices()
QSharedPointer<QLowEnergyServicePrivate> QLowEnergyControllerPrivate::serviceForHandle(
QLowEnergyHandle handle)
{
- ServiceDataMap& currentList = serviceList;
+ ServiceDataMap &currentList = serviceList;
if (role == QLowEnergyController::PeripheralRole)
currentList = localServices;
diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp
index 52afbd15..c21705cf 100644
--- a/src/bluetooth/qlowenergycontroller_android.cpp
+++ b/src/bluetooth/qlowenergycontroller_android.cpp
@@ -685,13 +685,13 @@ void QLowEnergyControllerPrivate::serverDescriptorWritten(
// TODO test if service contains two characteristics with same uuid
// or characteristic contains two descriptors with same uuid
const auto handleList = servicePrivate->characteristicList.keys();
- for (const auto charHandle : handleList) {
+ for (const auto charHandle: handleList) {
const auto &charData = servicePrivate->characteristicList.value(charHandle);
if (charData.uuid != characteristicUuid)
continue;
const auto &descHandleList = charData.descriptorList.keys();
- for (const auto descHandle : descHandleList) {
+ for (const auto descHandle: descHandleList) {
const auto &descData = charData.descriptorList.value(descHandle);
if (descData.uuid != descriptorUuid)
continue;
@@ -765,8 +765,8 @@ void QLowEnergyControllerPrivate::serverCharacteristicChanged(
QLowEnergyHandle foundHandle = 0;
const auto handleList = servicePrivate->characteristicList.keys();
// TODO test if service contains two characteristics with same uuid
- for (const auto handle : handleList) {
- QLowEnergyServicePrivate::CharData& charData = servicePrivate->characteristicList[handle];
+ for (const auto handle: handleList) {
+ QLowEnergyServicePrivate::CharData &charData = servicePrivate->characteristicList[handle];
if (charData.uuid != characteristicUuid)
continue;
@@ -848,7 +848,7 @@ void QLowEnergyControllerPrivate::advertisementError(int errorCode)
}
}
-static QAndroidJniObject javaParcelUuidfromQtUuid(const QBluetoothUuid& uuid)
+static QAndroidJniObject javaParcelUuidfromQtUuid(const QBluetoothUuid &uuid)
{
QString output = uuid.toString();
// cut off leading and trailing brackets
@@ -922,7 +922,7 @@ static QAndroidJniObject createJavaAdvertiseData(const QLowEnergyAdvertisingData
return javaAdvertiseData;
}
-static QAndroidJniObject createJavaAdvertiseSettings(const QLowEnergyAdvertisingParameters& params)
+static QAndroidJniObject createJavaAdvertiseSettings(const QLowEnergyAdvertisingParameters &params)
{
QAndroidJniObject builder = QAndroidJniObject("android/bluetooth/le/AdvertiseSettings$Builder");
@@ -1001,7 +1001,7 @@ void QLowEnergyControllerPrivate::requestConnectionUpdate(const QLowEnergyConnec
return;
}
- bool result = hub->javaObject().callMethod<jboolean>("requestConnectionUpdatePriority",
+ const bool result = hub->javaObject().callMethod<jboolean>("requestConnectionUpdatePriority",
"(D)Z", params.minimumInterval());
if (!result)
qCWarning(QT_BT_ANDROID) << "Cannot set connection update priority";
@@ -1051,7 +1051,7 @@ static int setupCharPermissions(const QLowEnergyCharacteristicData &charData)
if (charData.properties() &
(QLowEnergyCharacteristic::Write|QLowEnergyCharacteristic::WriteNoResponse) ) {
- if (((int)charData.writeConstraints()) == 0 // no flag is equivalent ti simple write
+ if (int(charData.writeConstraints()) == 0 // no flag is equivalent ti simple write
|| (charData.writeConstraints() & QBluetooth::AttAuthorizationRequired)) {
permission |= QAndroidJniObject::getStaticField<jint>(
"android/bluetooth/BluetoothGattCharacteristic",
@@ -1115,7 +1115,7 @@ static int setupDescPermissions(const QLowEnergyDescriptorData &descData)
}
if (descData.isWritable()) {
- if (((int)descData.readConstraints()) == 0 // empty is equivalent to simple read
+ if (int(descData.readConstraints()) == 0 // empty is equivalent to simple read
|| (descData.readConstraints() & QBluetooth::AttAuthorizationRequired)) {
permissions |= QAndroidJniObject::getStaticField<jint>(
"android/bluetooth/BluetoothGattDescriptor",