diff options
author | Andrew Knight <andrew.knight@digia.com> | 2013-09-01 19:05:46 +0300 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@digia.com> | 2013-09-02 13:43:19 +0200 |
commit | 06c1ec4dd1df6e0bc417241bd15f164b38de87b3 (patch) | |
tree | 0b29ca3d73bcdf22664cd6e63703258de7bfa565 /tests/auto/corelib/thread | |
parent | ce65e5ef6fd1da5de952b9491942083aedeacd40 (diff) | |
download | qtbase-winrt.tar.gz |
WinRT: Fix various test compilationswinrt
- Remove irrelevant test subdirs via .pro files
- Follow WinCE codepaths where applicable
- Replace unsupported Win32 APIs with WinRT equivalents
This does not aim to fix any failures in the tests themselves; it only
makes them compile.
Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/corelib/thread')
-rw-r--r-- | tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp | 2 | ||||
-rw-r--r-- | tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 8991d2e5b9..a5cd1341f8 100644 --- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -52,6 +52,8 @@ #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) #include <windows.h> #define sleep(X) Sleep(X) +#elif defined(Q_OS_WINRT) +#define sleep(X) WaitForSingleObjectEx(GetCurrentThread(), X, FALSE); #endif //on solaris, threads that loop one the release bool variable diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp index 2072034f5f..c96de29b98 100644 --- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp +++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp @@ -232,7 +232,7 @@ void tst_QThreadStorage::adoptedThreads() const int state = pthread_create(&thread, 0, testAdoptedThreadStorageUnix, &pointers); QCOMPARE(state, 0); pthread_join(thread, 0); -#elif defined Q_OS_WIN +#elif defined Q_OS_WIN && !defined(Q_OS_WINRT) HANDLE thread; #if defined(Q_OS_WINCE) thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)testAdoptedThreadStorageWin, &pointers, 0, NULL); |