diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-01-23 10:58:27 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-23 18:47:51 +0000 |
commit | 9e0a0f604014b92f9c26149c73fcd6dc4123eeef (patch) | |
tree | 9731760a527652d731533dd68183ac6a90374256 | |
parent | 6196c467c0ed29580ef70b409ff4908e662cddeb (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.h | 1 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothutils_winrt_p.h | 1 |
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> |