diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2019-08-08 11:21:33 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2019-08-08 14:57:51 +0200 |
commit | ccc1544f5ff929f466df8c790a4e7595e177a720 (patch) | |
tree | f1daaa4aff7dcc28aa94a829211c46812ae32654 | |
parent | 41026f61a3202371e0049c2aacce07bed45557c6 (diff) |
Fix QSet and QList related warnings
Addressed warnings are:
warning: QSet<T> QList<T>::toSet() const [with T = QBluetoothUuid]
is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
warning: QList<T> QSet<T>::toList() const [with T = QBluetoothUuid]
is deprecated: Use values() instead. [-Wdeprecated-declarations]
Change-Id: I9e1a4105edd328bbdf6201eb9b73e9eaef71769c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp | 4 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_bluez.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp index 9d306053..7cabe9d0 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp @@ -882,9 +882,9 @@ void QBluetoothDeviceDiscoveryAgentPrivate::registerDevice(const QBluetoothDevic // merge service uuids QList<QBluetoothUuid> uuids = iter->serviceUuids(); uuids.append(info.serviceUuids()); - const QSet<QBluetoothUuid> uuidSet = uuids.toSet(); + const QSet<QBluetoothUuid> uuidSet(uuids.begin(), uuids.end()); if (iter->serviceUuids().count() != uuidSet.count()) - iter->setServiceUuids(uuidSet.toList().toVector()); + iter->setServiceUuids(uuidSet.values().toVector()); if (iter->coreConfigurations() != info.coreConfigurations()) iter->setCoreConfigurations(QBluetoothDeviceInfo::BaseRateAndLowEnergyCoreConfiguration); return; diff --git a/src/bluetooth/qbluetoothlocaldevice_bluez.cpp b/src/bluetooth/qbluetoothlocaldevice_bluez.cpp index f02c6ab9..f48717a6 100644 --- a/src/bluetooth/qbluetoothlocaldevice_bluez.cpp +++ b/src/bluetooth/qbluetoothlocaldevice_bluez.cpp @@ -1133,7 +1133,7 @@ void QBluetoothLocalDevicePrivate::createCache() QList<QBluetoothAddress> QBluetoothLocalDevicePrivate::connectedDevices() const { - return connectedDevicesSet.toList(); + return connectedDevicesSet.values(); } void QBluetoothLocalDevice::pairingConfirmation(bool confirmation) |