diff options
author | Timothy Pearson <[email protected]> | 2013-02-24 02:27:31 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-02-24 02:27:31 -0600 |
commit | 89af6f8007568a86132c9b4cc0a21356572a8bda (patch) | |
tree | 73a19bf7c557b2da338d1e580d16c0e17ef33a7e /src | |
parent | 82b71e49603bf3a53240076c395864addd869267 (diff) | |
download | qt3-89af6f8007568a86132c9b4cc0a21356572a8bda.tar.gz qt3-89af6f8007568a86132c9b4cc0a21356572a8bda.zip |
Restore expected qApp->exit() behaviour when called from a non-GUI thread
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/qapplication.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 5b43301..591fc8d 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -2931,7 +2931,14 @@ int QApplication::exec() */ void QApplication::exit( int retcode ) { - qApp->eventLoop()->exit( retcode ); + QThread* thread = qApp->guiThread(); + if (thread) { + if (thread->d) { + if (thread->d->eventLoop) { + thread->d->eventLoop->exit( retcode ); + } + } + } } /*! |