summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2019-04-03 13:34:20 +0200
committerOliver Wolff <oliver.wolff@qt.io>2019-04-15 12:24:15 +0000
commit25d556c2097445d16cc05b3961f86f1b6ae60ed1 (patch)
tree05e3141d8cff0bf688e22b8b797eb6fedc14ef8c /src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
parent1bf25e130d4d6ae859c4f2aabe2a752532aee5e5 (diff)
winrt: Move byteArrayFromBuffer into qbluetoothutils_winrt
That code has been (unneededly) duplicated several times. We should have that helper function just once. Change-Id: I28fc9c5f7f7218b7870dc30bec228c9af8c6b090 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp')
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
index e0209693..177b8082 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
@@ -87,21 +87,6 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT_WINRT)
continue; \
}
-static QByteArray byteArrayFromBuffer(const ComPtr<IBuffer> &buffer)
-{
- ComPtr<Windows::Storage::Streams::IBufferByteAccess> byteAccess;
- HRESULT hr = buffer.As(&byteAccess);
- Q_ASSERT_SUCCEEDED(hr);
- char *data;
- hr = byteAccess->Buffer(reinterpret_cast<byte **>(&data));
- Q_ASSERT_SUCCEEDED(hr);
- UINT32 size;
- hr = buffer->get_Length(&size);
- Q_ASSERT_SUCCEEDED(hr);
- return QByteArray(data, int(size));
-}
-
-
static ManufacturerData extractManufacturerData(ComPtr<IBluetoothLEAdvertisement> ad)
{
ManufacturerData ret;