From 67c83f329e7fb6fbf5d8e402f42ea8916c34f01c Mon Sep 17 00:00:00 2001 From: Andrew Knight <andrew.knight@digia.com> Date: Wed, 20 Aug 2014 22:30:19 +0300 Subject: [PATCH] Tighten Q_OS_WINRT ifdefs in qfunctions_winrt.h This allows the convenience macros to be used on desktop Windows 8 when interacting with Windows Runtime types. Change-Id: I09c6b18a6ee9711371ef7dc23fb1d3354198db1c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> --- src/corelib/kernel/qfunctions_winrt.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qfunctions_winrt.h b/src/corelib/kernel/qfunctions_winrt.h index 5f051c3ea6c..c43e8bc902b 100644 --- a/src/corelib/kernel/qfunctions_winrt.h +++ b/src/corelib/kernel/qfunctions_winrt.h @@ -44,8 +44,6 @@ #include <QtCore/qglobal.h> -#ifdef Q_OS_WINRT - #include <QtCore/QThread> #include <QtCore/QAbstractEventDispatcher> #include <QtCore/qt_windows.h> @@ -57,6 +55,8 @@ QT_BEGIN_NAMESPACE QT_END_NAMESPACE +#ifdef Q_OS_WINRT + // Environment ------------------------------------------------------ errno_t qt_winrt_getenv_s(size_t*, char*, size_t, const char*); errno_t qt_winrt__putenv_s(const char*, const char*); @@ -122,6 +122,8 @@ generate_inline_return_func2(_putenv_s, errno_t, const char *, const char *) generate_inline_return_func0(tzset, void) generate_inline_return_func0(_tzset, void) +#endif // Q_OS_WINRT + // Convenience macros for handling HRESULT values #define RETURN_IF_FAILED(msg, ret) \ if (FAILED(hr)) { \ @@ -211,5 +213,4 @@ static inline HRESULT await(const Microsoft::WRL::ComPtr<T> &asyncOp, U *results } // QWinRTFunctions -#endif // Q_OS_WINRT #endif // QFUNCTIONS_WINRT_H -- GitLab