diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-02-08 15:55:29 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-23 15:07:58 +0100 |
commit | b067f6cfe30a5a687316130d04678ac406837d09 (patch) | |
tree | d23e2377d7e2b96ffc64e27389edac6a121b46c7 /src/corelib/thread/qthread.cpp | |
parent | 422b6ba9ecf0595da5772afec8c5a0a00983d95d (diff) |
Add the quitlock feature to QThread.
Change-Id: Ib44ee9739499ba4c5f0fecbef3976251ea22836d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r-- | src/corelib/thread/qthread.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index be0a98d3b5..a071463178 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -763,5 +763,14 @@ void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher) } } +bool QThread::event(QEvent *event) +{ + if (event->type() == QEvent::Quit) { + quit(); + return true; + } else { + return QObject::event(event); + } +} QT_END_NAMESPACE |