diff options
4 files changed, 14 insertions, 7 deletions
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 <unistd.h> #endif -#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) -#include <windows.h> -#define sleep(X) Sleep(X) +#if defined(Q_OS_WIN) +# include <qt_windows.h> +# 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 diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 03d6c1cdbd..36a3a8bad5 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -171,7 +171,7 @@ static inline void centerOnScreen(QWidget *w) w->move(QGuiApplication::primaryScreen()->availableGeometry().center() - offset); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) static inline void setWindowsAnimationsEnabled(bool enabled) { ANIMATIONINFO animation = { sizeof(ANIMATIONINFO), enabled }; @@ -184,10 +184,10 @@ static inline bool windowsAnimationsEnabled() SystemParametersInfo(SPI_GETANIMATION, 0, &animation, 0); return animation.iMinAnimate; } -#else // Q_OS_WIN && !Q_OS_WINCE +#else // Q_OS_WIN && !Q_OS_WINCE && !Q_OS_WINRT inline void setWindowsAnimationsEnabled(bool) {} static inline bool windowsAnimationsEnabled() { return false; } -#endif // !Q_OS_WIN || Q_OS_WINCE +#endif // !Q_OS_WIN || Q_OS_WINCE || Q_OS_WINRT class tst_QWidget : public QObject { diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro index 3940ddbf98..8fd4db6b4b 100644 --- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro @@ -1,5 +1,6 @@ SOURCES = main.cpp CONFIG -= qt app_bundle CONFIG += console +winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup DESTDIR = ./ DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp index a7480e6afe..47227ef630 100644 --- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp +++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp @@ -88,7 +88,9 @@ void NativeMutexUnlock(NativeMutexType *mutex) } #endif #elif defined(Q_OS_WIN) -# define _WIN32_WINNT 0x0400 +# ifndef Q_OS_WINRT +# define _WIN32_WINNT 0x0400 +# endif # include <windows.h> typedef CRITICAL_SECTION NativeMutexType; void NativeMutexInitialize(NativeMutexType *mutex) |