diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-09-18 13:53:24 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2018-10-09 07:47:56 +0000 |
commit | fac56a229b45395488f3e41bf178361c72b3ee1e (patch) | |
tree | ae99681642099d2bd3cb42fc66804f61c6f65aab /src/bluetooth/osx | |
parent | 7ef3dfbd4354367ad78040010aa851943b7b9e75 (diff) |
Deprecate QBluetoothDeviceInfo::DataCompleteness with Qt 6 in mind
The patch deprecates the mentioned enum and all users of it. In addition,
QList usage is replaced by QVector (which is a design pattern in Qt).
Task-number: QTBUG-62425
Change-Id: I63e8dceb03ed231d0d06709896a1aad2b6bb31a3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/osx')
-rw-r--r-- | src/bluetooth/osx/osxbtledeviceinquiry.mm | 8 | ||||
-rw-r--r-- | src/bluetooth/osx/osxbtsdpinquiry.mm | 4 | ||||
-rw-r--r-- | src/bluetooth/osx/osxbtsdpinquiry_p.h | 3 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm index e61968ed..677a4660 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm @@ -81,7 +81,7 @@ struct AdvertisementData { // For now, we "parse": QString localName; - QList<QBluetoothUuid> serviceUuids; + QVector<QBluetoothUuid> serviceUuids; QHash<quint16, QByteArray> manufacturerData; // TODO: other keys probably? AdvertisementData(NSDictionary *AdvertisementData); @@ -324,10 +324,8 @@ QT_USE_NAMESPACE if (RSSI) newDeviceInfo.setRssi([RSSI shortValue]); - if (qtAdvData.serviceUuids.size()) { - newDeviceInfo.setServiceUuids(qtAdvData.serviceUuids, - QBluetoothDeviceInfo::DataIncomplete); - } + if (qtAdvData.serviceUuids.size()) + newDeviceInfo.setServiceUuids(qtAdvData.serviceUuids); const QList<quint16> keys = qtAdvData.manufacturerData.keys(); for (quint16 key : keys) diff --git a/src/bluetooth/osx/osxbtsdpinquiry.mm b/src/bluetooth/osx/osxbtsdpinquiry.mm index 6df2d16e..88849872 100644 --- a/src/bluetooth/osx/osxbtsdpinquiry.mm +++ b/src/bluetooth/osx/osxbtsdpinquiry.mm @@ -112,9 +112,9 @@ void extract_service_record(IOBluetoothSDPServiceRecord *record, QBluetoothServi } } -QList<QBluetoothUuid> extract_services_uuids(IOBluetoothDevice *device) +QVector<QBluetoothUuid> extract_services_uuids(IOBluetoothDevice *device) { - QList<QBluetoothUuid> uuids; + QVector<QBluetoothUuid> uuids; // All "temporary" obj-c objects are autoreleased. QT_BT_MAC_AUTORELEASEPOOL; diff --git a/src/bluetooth/osx/osxbtsdpinquiry_p.h b/src/bluetooth/osx/osxbtsdpinquiry_p.h index 6b39634e..f8eaf735 100644 --- a/src/bluetooth/osx/osxbtsdpinquiry_p.h +++ b/src/bluetooth/osx/osxbtsdpinquiry_p.h @@ -57,6 +57,7 @@ #include <QtCore/qglobal.h> #include <QtCore/qlist.h> +#include <QtCore/qvector.h> #include <Foundation/Foundation.h> @@ -81,7 +82,7 @@ public: void extract_service_record(IOBluetoothSDPServiceRecord *record, QBluetoothServiceInfo &serviceInfo); QVariant extract_attribute_value(IOBluetoothSDPDataElement *dataElement); -QList<QBluetoothUuid> extract_services_uuids(IOBluetoothDevice *device); +QVector<QBluetoothUuid> extract_services_uuids(IOBluetoothDevice *device); } |