summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qfunctions_winrt.h
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-08-20 22:30:19 +0300
committerAndrew Knight <andrew.knight@digia.com>2014-08-21 18:21:52 +0200
commit67c83f329e7fb6fbf5d8e402f42ea8916c34f01c (patch)
tree93f5edb7f5bb4630b3627758665f59dd8ec2456e /src/corelib/kernel/qfunctions_winrt.h
parent4a2e297b4f091d212b184352fd2d3563c5ea5286 (diff)
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>
Diffstat (limited to 'src/corelib/kernel/qfunctions_winrt.h')
-rw-r--r--src/corelib/kernel/qfunctions_winrt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/kernel/qfunctions_winrt.h b/src/corelib/kernel/qfunctions_winrt.h
index 5f051c3ea6..c43e8bc902 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