summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-04-23 09:29:12 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-04-23 10:10:59 (GMT)
commit662f33a5b39f31579a2557a4d81469cfe30815c7 (patch)
treec56c2bcc9f4b1d28f30c76d44782bc4af4185c51 /src/corelib/thread/qthread_win.cpp
parentd11cf4b8795a0f39e76432aa805f098388579d2d (diff)
downloadQt-662f33a5b39f31579a2557a4d81469cfe30815c7.zip
Qt-662f33a5b39f31579a2557a4d81469cfe30815c7.tar.gz
Qt-662f33a5b39f31579a2557a4d81469cfe30815c7.tar.bz2
Allow QThread to start a QTimer and QEventLoop before QCoreApplication is constructed
Fix a regression from 4.3 to 4.4 that prevented QThread from starting timers and event loops before QCoreApplication was instantiated. Even though this is documented not to work, it seems that people have been relying on it. This reverts commit e52e5acdfa198cd079bbfe3a9302debf46c7cadd which attempted to work around not calling g_thread_init() multiple times. The proper fix is to serialize the g_thread_supported() checks in the Glib event dispatcher. Task-number: 248191 Reviewed-by: denis
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 27193c6..7094e3d 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -292,8 +292,7 @@ unsigned int __stdcall QThreadPrivate::start(void *arg)
data->quitNow = false;
// ### TODO: allow the user to create a custom event dispatcher
- if (QCoreApplication::instance())
- createEventDispatcher(data);
+ createEventDispatcher(data);
#if !defined(QT_NO_DEBUG) && defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)
// sets the name of the current thread.