Use qt_winrtbase_p.h workaround in more places

This patch addresses the following issues:
(1) some places are still using the original workaround, replace
them with the new qt_winrtbase_p.h workaround.
(2) add more comment to let people know how to workaround other
cppwinrt issues (it was a common issue for many years and may be
fixed upstream recently, but let's at least document it in case
the user is still using old version cppwinrt).

Amends commit b2c1237b4512480a17009afe1981af02c2a9869e

Change-Id: Ife676f41739bbe69d9fb23bf5758be4b1fab4855
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit ad7227ada177dec4e61e8bbc51dd70f00a6e3d15)
This commit is contained in:
Yuhang Zhao 2023-01-25 09:03:15 +08:00
parent a28eca8eff
commit 5e1e9130fd

View File

@ -18,8 +18,8 @@
#include <QtCore/qglobal.h>
#if QT_CONFIG(cpp_winrt)
#include <winrt/base.h>
#include <QtCore/private/qfactorycacheregistration_p.h>
# include <winrt/base.h>
# include <QtCore/private/qfactorycacheregistration_p.h>
// Workaround for Windows SDK bug.
// See https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/47
namespace winrt::impl
@ -27,6 +27,8 @@ namespace winrt::impl
template <typename Async>
auto wait_for(Async const& async, Windows::Foundation::TimeSpan const& timeout);
}
// See https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/faq#how-do-i-resolve-ambiguities-with-getcurrenttime-and-or-try-
// for more workarounds.
#endif // QT_CONFIG(cpp/winrt)
#endif // QT_WINRTBASE_P_H