diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-03 10:47:16 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-03 10:47:16 (GMT) |
commit | fda461ddb2ae740b50544d1fd8309d51418912db (patch) | |
tree | d58cd7af2f74a3cef032b81668baef3ef06c75ec /src/corelib/thread/qthread.cpp | |
parent | 6e18291266ed33c27c35f069f6915c353d96ee8c (diff) | |
parent | 4de2ce7717ba52d3056f10e0a9fbb44eba4091bc (diff) | |
download | Qt-fda461ddb2ae740b50544d1fd8309d51418912db.zip Qt-fda461ddb2ae740b50544d1fd8309d51418912db.tar.gz Qt-fda461ddb2ae740b50544d1fd8309d51418912db.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r-- | src/corelib/thread/qthread.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index b8f891c..326f494 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -488,7 +488,10 @@ int QThread::exec() Q_D(QThread); QMutexLocker locker(&d->mutex); d->data->quitNow = false; - d->exited = false; + if (d->exited) { + d->exited = false; + return d->returnCode; + } locker.unlock(); QEventLoop eventLoop; @@ -512,10 +515,12 @@ int QThread::exec() Note that unlike the C library function of the same name, this function \e does return to the caller -- it is event processing - that stops. - - This function does nothing if the thread does not have an event - loop. + that stops. + + No QEventLoops will be started anymore in this thread until + QThread::exec() has been called again. If the eventloop in QThread::exec() + is not running then the next call to QThread::exec() will also return + immediately. \sa quit() QEventLoop */ |