summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/thread/qthread_symbian.cpp2
-rw-r--r--src/corelib/thread/qthread_unix.cpp3
-rw-r--r--src/corelib/thread/qthread_win.cpp2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp
index 1d3376e..607e3ac 100644
--- a/src/corelib/thread/qthread_symbian.cpp
+++ b/src/corelib/thread/qthread_symbian.cpp
@@ -336,7 +336,9 @@ typedef void*(*QtThreadCallback)(void*);
void QThreadPrivate::createEventDispatcher(QThreadData *data)
{
+ QMutexLocker l(&data->postEventList.mutex);
data->eventDispatcher = new QEventDispatcherSymbian;
+ l.unlock();
data->eventDispatcher->startingUp();
}
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 4d85968..7d8df26 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -273,6 +273,8 @@ typedef void*(*QtThreadCallback)(void*);
void QThreadPrivate::createEventDispatcher(QThreadData *data)
{
+ QMutexLocker l(&data->postEventList.mutex);
+
#if defined(Q_OS_BLACKBERRY)
data->eventDispatcher = new QEventDispatcherBlackberry;
#else
@@ -286,6 +288,7 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data)
data->eventDispatcher = new QEventDispatcherUNIX;
#endif
+ l.unlock();
data->eventDispatcher->startingUp();
}
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 4ebae9e..01ddf02 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -318,7 +318,9 @@ void qt_set_thread_name(HANDLE threadId, LPCSTR threadName)
void QThreadPrivate::createEventDispatcher(QThreadData *data)
{
+ QMutexLocker l(&data->postEventList.mutex);
data->eventDispatcher = new QEventDispatcherWin32;
+ l.unlock();
data->eventDispatcher->startingUp();
}