summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_android.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-08-14 11:08:18 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-08-15 07:56:46 +0000
commita0ade068004ad869d6235ae8d6cd5e2050bf765d (patch)
tree42c949ba2fa7fcd4ab5356293d1ef3cad1c436f6 /src/bluetooth/qlowenergycontroller_android.cpp
parent84f0e76c647e7f09529b79525b2d4fbc698576d8 (diff)
Replace foreach with for loop and set QT_NO_FOREACH
To avoid unnecessary copies, const is used wherever possible. Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_android.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_android.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp
index 54665f7b..35d943fc 100644
--- a/src/bluetooth/qlowenergycontroller_android.cpp
+++ b/src/bluetooth/qlowenergycontroller_android.cpp
@@ -501,7 +501,7 @@ void QLowEnergyControllerPrivateAndroid::servicesDiscovered(
if (errorCode == QLowEnergyController::NoError) {
//Android delivers all services in one go
const QStringList list = foundServices.split(QStringLiteral(" "), QString::SkipEmptyParts);
- foreach (const QString &entry, list) {
+ for (const QString &entry : list) {
const QBluetoothUuid service(entry);
if (service.isNull())
return;
@@ -550,7 +550,7 @@ void QLowEnergyControllerPrivateAndroid::serviceDetailsDiscoveryFinished(
const QStringList list = javaIncludes.toString()
.split(QStringLiteral(" "),
QString::SkipEmptyParts);
- foreach (const QString &entry, list) {
+ for (const QString &entry : list) {
const QBluetoothUuid service(entry);
if (service.isNull())
return;