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-02-07 15:07:32 +0000 |
commit | a2f6880a8c4c19bf924cccab47cdc34cfe16c2e8 (patch) | |
tree | 9eb0ae306a0f70d876838e7848a170388227ad63 | |
parent | 8bc785d4179135c78f42eca98d243fa544e6c69d (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 12935c27..007b4d5d 100644 --- a/src/bluetooth/qbluetoothdevicewatcher_winrt_p.h +++ b/src/bluetooth/qbluetoothdevicewatcher_winrt_p.h @@ -57,6 +57,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 36bb95c8..e317f9e3 100644 --- a/src/bluetooth/qbluetoothutils_winrt_p.h +++ b/src/bluetooth/qbluetoothutils_winrt_p.h @@ -54,6 +54,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> |