diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 61a8b6a18c..100e014e99 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -318,6 +318,13 @@ struct QCoreApplicationData { #ifndef QT_NO_LIBRARY delete app_libpaths; #endif +#ifndef QT_NO_QOBJECT + // cleanup the QAdoptedThread created for the main() thread + if (QCoreApplicationPrivate::theMainThread) { + QThreadData *data = QThreadData::get2(QCoreApplicationPrivate::theMainThread); + data->deref(); // deletes the data and the adopted thread + } +#endif } #ifdef Q_OS_BLACKBERRY |