summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothlocaldevice_win.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2017-06-01 16:56:23 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2017-06-07 17:47:42 +0000
commit5c62cfd89db15229fa9a96825c04ad6b6fd08db9 (patch)
treea3874fb237a9b92e238739d819b25c1782e8d28e /src/bluetooth/qbluetoothlocaldevice_win.cpp
parentf02932a14e902a5a4cd7f3fe34c85ddb636e6044 (diff)
Replace 'foreach' macro with range-based 'for'
Change-Id: I7010ff54a146a9d70029e2607b415e0e1dcc1d78 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothlocaldevice_win.cpp')
-rw-r--r--src/bluetooth/qbluetoothlocaldevice_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_win.cpp b/src/bluetooth/qbluetoothlocaldevice_win.cpp
index 816a3a4b..78b82a97 100644
--- a/src/bluetooth/qbluetoothlocaldevice_win.cpp
+++ b/src/bluetooth/qbluetoothlocaldevice_win.cpp
@@ -199,7 +199,8 @@ void QBluetoothLocalDevicePrivate::initialize(const QBluetoothAddress &address)
{
Q_Q(QBluetoothLocalDevice);
- foreach (const QBluetoothHostInfo &adapterInfo, QBluetoothLocalDevicePrivate::localAdapters()) {
+ const QList<QBluetoothHostInfo> adapterInfos = QBluetoothLocalDevicePrivate::localAdapters();
+ for (const QBluetoothHostInfo &adapterInfo : adapterInfos) {
if (address == QBluetoothAddress()
|| address == adapterInfo.address()) {
deviceAddress = adapterInfo.address();