diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-09-27 19:53:01 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-29 06:41:42 +0200 |
commit | 95cebd34ebc5b4d39b11dc91610309a35e488663 (patch) | |
tree | 90ceffef5acea093dd2b8f8f7e8c30593023b85a /tests/auto/corelib/thread/qthread | |
parent | ab061e3e436fab35eac8666f3e950e98f66c4d3e (diff) |
Remove Symbian-specific code from tests.
Symbian is not a supported platform for Qt5, so this code is no longer
required.
Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa
Reviewed-on: http://codereview.qt-project.org/5657
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/thread/qthread')
-rw-r--r-- | tests/auto/corelib/thread/qthread/qthread.pro | 1 | ||||
-rw-r--r-- | tests/auto/corelib/thread/qthread/tst_qthread.cpp | 26 |
2 files changed, 3 insertions, 24 deletions
diff --git a/tests/auto/corelib/thread/qthread/qthread.pro b/tests/auto/corelib/thread/qthread/qthread.pro index d3b1028034..ae11d719c0 100644 --- a/tests/auto/corelib/thread/qthread/qthread.pro +++ b/tests/auto/corelib/thread/qthread/qthread.pro @@ -1,5 +1,4 @@ load(qttest_p4) SOURCES += tst_qthread.cpp QT = core -symbian:LIBS += -llibpthread CONFIG += parallel_test diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index 3c46212c16..9600afd220 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -665,9 +665,7 @@ void tst_QThread::usleep() typedef void (*FunctionPointer)(void *); void noop(void*) { } -#ifdef Q_OS_SYMBIAN -typedef RThread ThreadHandle; -#elif defined Q_OS_UNIX +#if defined Q_OS_UNIX typedef pthread_t ThreadHandle; #elif defined Q_OS_WIN typedef HANDLE ThreadHandle; @@ -698,7 +696,6 @@ public: protected: static void *runUnix(void *data); static unsigned WIN_FIX_STDCALL runWin(void *data); - static int runSymbian(void *data); FunctionPointer functionPointer; void *data; @@ -708,10 +705,7 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data) { this->functionPointer = functionPointer; this->data = data; -#ifdef Q_OS_SYMBIAN - qt_symbian_throwIfError(nativeThreadHandle.Create(KNullDesC(), NativeThreadWrapper::runSymbian, 1024, &User::Allocator(), this)); - nativeThreadHandle.Resume(); -#elif defined Q_OS_UNIX +#if defined Q_OS_UNIX const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this); Q_UNUSED(state); #elif defined(Q_OS_WINCE) @@ -731,12 +725,7 @@ void NativeThreadWrapper::startAndWait(FunctionPointer functionPointer, void *da void NativeThreadWrapper::join() { -#ifdef Q_OS_SYMBIAN - TRequestStatus stat; - nativeThreadHandle.Logon(stat); - User::WaitForRequest(stat); - nativeThreadHandle.Close(); -#elif defined Q_OS_UNIX +#if defined Q_OS_UNIX pthread_join(nativeThreadHandle, 0); #elif defined Q_OS_WIN WaitForSingleObject(nativeThreadHandle, INFINITE); @@ -776,12 +765,6 @@ unsigned WIN_FIX_STDCALL NativeThreadWrapper::runWin(void *data) return 0; } -int NativeThreadWrapper::runSymbian(void *data) -{ - runUnix(data); - return 0; -} - void NativeThreadWrapper::stop() { QMutexLocker lock(&mutex); @@ -976,9 +959,6 @@ void tst_QThread::adoptMultipleThreadsOverlap() // need to test lots of threads, so that we exceed MAXIMUM_WAIT_OBJECTS in qt_adopted_thread_watcher() const int numThreads = 200; # endif -#elif defined(Q_OS_SYMBIAN) - // stress the monitoring thread's add function - const int numThreads = 100; #else const int numThreads = 5; #endif |