summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-09-20 12:43:50 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-20 16:03:37 +0000
commit674080a59307cf588126f74a65711a10762f29df (patch)
treec98b536b97d504035e9034c3c43612c74f6f6334
parentb5cd988f066a732468faeff39eb4afc38cc3a45c (diff)
downloadqtconnectivity-674080a59307cf588126f74a65711a10762f29df.tar.gz
Add windows bluetooth discovery worker metatype registration
The crash fix for QTBUG-106029 introduced a shared_ptr<QWinRTBluetoothDeviceDiscoveryWorker> as a queued method invocation parameter. The missing registration didn't cause any issues on the 'dev' branch, but does cause on earlier branches. Fixes: QTBUG-106654 Change-Id: If03b020877e4eeaacc1db25b3854ba0c6b5447d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 72af5c8b523e3bd993bb6809128a119b1ec43c83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
index 48620816..c6e77e1d 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
@@ -327,6 +327,7 @@ QWinRTBluetoothDeviceDiscoveryWorker::QWinRTBluetoothDeviceDiscoveryWorker(
qRegisterMetaType<QBluetoothDeviceInfo>();
qRegisterMetaType<QBluetoothDeviceInfo::Fields>();
qRegisterMetaType<ManufacturerData>();
+ qRegisterMetaType<std::shared_ptr<QWinRTBluetoothDeviceDiscoveryWorker>>();
m_classicWatcher = createDeviceWatcher(ClassicDeviceSelector, ClassicWatcherId);
// For LE scan use DeviceWatcher to handle only paired devices.