From 1c2be58fecaff1de5f2849192eb712984ebd59bd Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Tue, 26 Nov 2013 11:00:31 +0200 Subject: Fix test compilation on WinRT Tweak a handful of tests which didn't compile on this platform. Change-Id: I208d9eb289dfb226746c6d0163c3ea752485033b Reviewed-by: Friedemann Kleint Reviewed-by: Frederik Gladhorn --- .../auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp') diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 7d041e69cb..ac8d433f96 100644 --- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -49,9 +49,13 @@ #ifdef Q_OS_UNIX #include #endif -#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) -#include -#define sleep(X) Sleep(X) +#if defined(Q_OS_WIN) +# include +# ifndef Q_OS_WINRT +# define sleep(X) Sleep(X) +# else +# define sleep(X) WaitForSingleObjectEx(GetCurrentThread(), X, FALSE); +# endif #endif //on solaris, threads that loop on the release bool variable -- cgit v1.2.3