summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-03-23 10:25:46 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-03-30 11:22:47 +0000
commit7fc2864dc5391096a19c2d5f80695129c24cc303 (patch)
treecd52ea13882972c24fca1cdd032ecd7e92725df5 /src/corelib/thread/qthread_win.cpp
parent04aa760711602d3891d1f7f71e7f27911ff80d97 (diff)
QtCore: Remove Windows CE.
Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index ef1799a021..74e191f889 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -55,15 +55,10 @@
#include <qt_windows.h>
#ifndef Q_OS_WINRT
-#ifndef Q_OS_WINCE
-#ifndef _MT
-#define _MT
-#endif // _MT
-#include <process.h>
-#else // !Q_OS_WINCE
-#include "qfunctions_wince.h"
-#endif // Q_OS_WINCE
-#else // !Q_OS_WINRT
+# ifndef _MT
+# define _MT
+# endif // _MT
+# include <process.h>
#endif // Q_OS_WINRT
#ifndef QT_NO_THREAD
@@ -150,7 +145,6 @@ QThreadData *QThreadData::current(bool createIfNecessary)
// WinRT API?
} else {
HANDLE realHandle = INVALID_HANDLE_VALUE;
-#if !defined(Q_OS_WINCE) || (defined(_WIN32_WCE) && (_WIN32_WCE>=0x600))
DuplicateHandle(GetCurrentProcess(),
GetCurrentThread(),
GetCurrentProcess(),
@@ -158,9 +152,6 @@ QThreadData *QThreadData::current(bool createIfNecessary)
0,
FALSE,
DUPLICATE_SAME_ACCESS);
-#else
- realHandle = reinterpret_cast<HANDLE>(GetCurrentThreadId());
-#endif
qt_watch_adopted_thread(realHandle, threadData->thread);
}
}
@@ -190,9 +181,7 @@ void qt_watch_adopted_thread(const HANDLE adoptedThreadHandle, QThread *qthread)
QMutexLocker lock(&qt_adopted_thread_watcher_mutex);
if (GetCurrentThreadId() == qt_adopted_thread_watcher_id) {
-#if !defined(Q_OS_WINCE) || (defined(_WIN32_WCE) && (_WIN32_WCE>=0x600))
CloseHandle(adoptedThreadHandle);
-#endif
return;
}
@@ -291,9 +280,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
data->deref();
QMutexLocker lock(&qt_adopted_thread_watcher_mutex);
-#if !defined(Q_OS_WINCE) || (defined(_WIN32_WCE) && (_WIN32_WCE>=0x600))
CloseHandle(qt_adopted_thread_handles.at(handleIndex));
-#endif
qt_adopted_thread_handles.remove(handleIndex);
qt_adopted_qthreads.remove(qthreadIndex);
}
@@ -306,7 +293,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
return 0;
}
-#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINRT)
#ifndef Q_OS_WIN64
# define ULONG_PTR DWORD
@@ -336,7 +323,7 @@ void qt_set_thread_name(HANDLE threadId, LPCSTR threadName)
{
}
}
-#endif // !QT_NO_DEBUG && Q_CC_MSVC && !Q_OS_WINCE && !Q_OS_WINRT
+#endif // !QT_NO_DEBUG && Q_CC_MSVC && !Q_OS_WINRT
/**************************************************************************
** QThreadPrivate
@@ -378,7 +365,7 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi
else
createEventDispatcher(data);
-#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINRT)
// sets the name of the current thread.
QByteArray objectName = thr->objectName().toLocal8Bit();
qt_set_thread_name((HANDLE)-1,
@@ -453,7 +440,7 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW
void QThread::yieldCurrentThread()
{
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
SwitchToThread();
#else
::Sleep(0);