Fix clazy warning

Missing reference in range-for with non trivial type (QBluetoothDeviceInfo)

Change-Id: I6f2e3092054376fdc52acdbeba149fe1a02b88fe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
This commit is contained in:
Alex Blasche 2021-02-24 13:16:13 +01:00
parent cd19f82503
commit fbc88b414c
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ void Device::addDevice(const QBluetoothDeviceInfo &info)
void Device::deviceScanFinished() void Device::deviceScanFinished()
{ {
const QList<QBluetoothDeviceInfo> foundDevices = discoveryAgent->discoveredDevices(); const QList<QBluetoothDeviceInfo> foundDevices = discoveryAgent->discoveredDevices();
for (auto nextDevice : foundDevices) for (auto &nextDevice : foundDevices)
if (nextDevice.coreConfigurations() & QBluetoothDeviceInfo::LowEnergyCoreConfiguration) if (nextDevice.coreConfigurations() & QBluetoothDeviceInfo::LowEnergyCoreConfiguration)
devices.append(new DeviceInfo(nextDevice)); devices.append(new DeviceInfo(nextDevice));