summaryrefslogtreecommitdiffstats
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
commit857bb209fa52870d01aeaf04a0abfafb3755860c (patch)
treef3f9cf84ee70120266ae08cfc916f4f45632cbb4
parent957b0647dcd6a536f641730f46bcf2b13b586203 (diff)
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 37659d4b..3274cbb2 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
@@ -294,6 +294,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.