Allow to create a custom event dispatcher for specific QThreads.
authorSven Anderson <Sven.Anderson@snom.com>
Thu, 8 Sep 2011 15:40:55 +0000 (17:40 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 15 Nov 2011 09:16:12 +0000 (10:16 +0100)
commit2b7d98ef8fbd6cf49326fa0bbf154e9bacbb7b49
tree250f2752acb679a237504ea70888b0ad5efa1251
parent51b7d3c8b621c2de6f98f465f478ec574bb14195
Allow to create a custom event dispatcher for specific QThreads.

QAbstractEventDispatcher() does no longer install itself into the current
thread.  Instead the new methods QThread::setEventDispatcher() and
QCoreApplication::setEventDispatcher() allow to install a custom event
dispatcher into any QThread as long as there is no default event dispatcher
created yet.  That is, before the thread has been started with
QThread::start() or, in case of the main thread, before QCoreApplication has
been instantiated.

Change-Id: I7367e13d8d8aebed5a5651260bb69b8818eb1b90
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/corelib/kernel/qabstracteventdispatcher.cpp
src/corelib/kernel/qabstracteventdispatcher_p.h
src/corelib/kernel/qcoreapplication.cpp
src/corelib/kernel/qcoreapplication.h
src/corelib/thread/qthread.cpp
src/corelib/thread/qthread.h
src/corelib/thread/qthread_unix.cpp
src/corelib/thread/qthread_win.cpp
tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
tests/auto/corelib/thread/qthread/tst_qthread.cpp