diff options
author | Sze Howe Koh <szehowe.koh@gmail.com> | 2012-10-19 00:33:03 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-19 20:25:16 +0200 |
commit | d7e8b57d0a98696a05cfb0eb15236a34301d9d0a (patch) | |
tree | 31926a55d022a399ae09eb85ad41a5e369d80215 /src/corelib/thread/qthread_unix.cpp | |
parent | 39eaff6773fc4f05fc95473b769b3a2f0301e12b (diff) |
Remove the QThread::terminated() signal
The signal is removed from the API; all references to it are removed
from documentation; the unit test that checks for its emission is
modified to listen for QThread::finished() instead.
The QThreadPrivate::terminated flag is also removed, as it served no
purpose other than to trigger the emission of QThread::terminated()
As discussed at http://lists.qt-project.org/pipermail/development/2012-October/007216.html
the signal is not guaranteed to be emitted after every termination,
rendering it useless.
Change-Id: I7b0c45d7889da0d33875545331606f2208ee56fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/thread/qthread_unix.cpp')
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 7fd89f4bca..2213b8f71a 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -346,16 +346,12 @@ void QThreadPrivate::finish(void *arg) d->isInFinish = true; d->priority = QThread::InheritPriority; - bool terminated = d->terminated; void *data = &d->data->tls; locker.unlock(); - if (terminated) - emit thr->terminated(); emit thr->finished(); QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QThreadStorageData::finish((void **)data); locker.relock(); - d->terminated = false; QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher; if (eventDispatcher) { @@ -523,7 +519,6 @@ void QThread::start(Priority priority) d->running = true; d->finished = false; - d->terminated = false; d->returnCode = 0; d->exited = false; @@ -631,8 +626,6 @@ void QThread::terminate() if (code) { qWarning("QThread::start: Thread termination error: %s", qPrintable(qt_error_string((code)))); - } else { - d->terminated = true; } #endif } |