summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-01-23 10:58:27 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-23 18:47:51 +0000
commit02e5c5b8dd318e424addd8993ddf7774a1f7533c (patch)
tree65208a8a7449862bdc5c09e5d0230b363ced2904
parentc11c44edd47ab885f955a8dc3602bbe75b37f0c3 (diff)
Proper clearing of WinRT factory cache in QtBluetooth
Because we include <winrt/base.h>, use the factory-cache-cleaner registration developed in qtbase/ffb9dee1b0954e4d4f9e9791175609a80ecafc31 to make QtBluetooth contribute its part to fixing QTBUG-103611. Including the qfactorycacheregistration_p.h header from another header is explicitly supported (inline variable). Task-number: QTBUG-103611 Change-Id: I1f21a7001a3eea88ddc5ba647c72c3dd22c69374 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 9d36ae3f8d00299ac483df983f244f3b1cc16d76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/bluetooth/qbluetoothdevicewatcher_winrt_p.h1
-rw-r--r--src/bluetooth/qbluetoothutils_winrt_p.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicewatcher_winrt_p.h b/src/bluetooth/qbluetoothdevicewatcher_winrt_p.h
index 08ab0c5e..74f56357 100644
--- a/src/bluetooth/qbluetoothdevicewatcher_winrt_p.h
+++ b/src/bluetooth/qbluetoothdevicewatcher_winrt_p.h
@@ -21,6 +21,7 @@
#include <private/qbluetoothutils_winrt_p.h>
#include <winrt/base.h>
+#include <QtCore/private/qfactorycacheregistration_p.h>
#include <winrt/Windows.Devices.Enumeration.h>
QT_BEGIN_NAMESPACE
diff --git a/src/bluetooth/qbluetoothutils_winrt_p.h b/src/bluetooth/qbluetoothutils_winrt_p.h
index 7a35f5a2..9e1d4752 100644
--- a/src/bluetooth/qbluetoothutils_winrt_p.h
+++ b/src/bluetooth/qbluetoothutils_winrt_p.h
@@ -18,6 +18,7 @@
// Workaround for Windows SDK bug.
// See https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/47
#include <winrt/base.h>
+#include <QtCore/private/qfactorycacheregistration_p.h>
namespace winrt::impl
{
template <typename Async>