summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-09-22 12:18:44 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-09-22 12:26:27 (GMT)
commitb93947f5a25b3cc021518b944dc96b892f672bd3 (patch)
tree8307c61613e4357778b2ef891b573d6a69fe03c5 /src/corelib
parent4035ec3e9ed5ef904dd6f22adaf5e9deb24e9455 (diff)
downloadQt-b93947f5a25b3cc021518b944dc96b892f672bd3.zip
Qt-b93947f5a25b3cc021518b944dc96b892f672bd3.tar.gz
Qt-b93947f5a25b3cc021518b944dc96b892f672bd3.tar.bz2
QThread: make sure start works even if called after exit
Regression in 4.7.0 introduced by 13ca61fcfdc53a6a06a Reviewed-by: brad Task-number: QTBUG-13810
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qthread_unix.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 2824e15..a7601b6 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -514,6 +514,8 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->returnCode = 0;
+ d->exited = false;
pthread_attr_t attr;
pthread_attr_init(&attr);
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 37d5b87..f0cbe8d 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -405,6 +405,8 @@ void QThread::start(Priority priority)
d->running = true;
d->finished = false;
d->terminated = false;
+ d->exited = false;
+ d->returnCode = 0;
/*
NOTE: we create the thread in the suspended state, set the