From a94dcc3125190a765a60c244a3dff61c3fe9b2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 6 Dec 2022 12:47:21 +0100 Subject: [PATCH] Work around missing wait_for declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Certain older SDKs don't declare the specific wait_for overload but still uses it. So, we declare it. Also add the factorycacheregistration include to wipe out any factory that may be created and cached in the TU. Change-Id: I778ab1b8724306b17bb6a2daa0b7364f268ded83 Reviewed-by: Tor Arne Vestbø Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/windows/qwindowsintegration.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 7fd3f4fcc1..75d383a268 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -62,6 +62,16 @@ #include "qwindowsopengltester.h" #if QT_CONFIG(cpp_winrt) +#include +#include +// Workaround for Windows SDK bug. +// See https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/47 +namespace winrt::impl +{ + template + auto wait_for(Async const& async, Windows::Foundation::TimeSpan const& timeout); +} + # include # include # include