diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-09-27 16:52:55 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-12-17 04:11:13 +0000 |
commit | 7c402ad3d15ff5e7c2b7319b1bea821f6f67e26c (patch) | |
tree | 41e0dce213765bb86919423e0818c5dc096e686d /src/widgets/doc | |
parent | c7b0f56fb1d33ebd8e0b96cee64a1bfb99abdbbd (diff) |
Make the bearer QFactoryLoader a member variable, not a static
Because it was a function-level static, the QFactoryLoader was getting
destroyed out-of-sync with the bearer thread stopping. Under normal
conditions, the thread stopped first (~QApplication / ~QCoreApplication
via qAddPostRoutine), and the static got destroyed when the process
exited. However, if QApplication leaked or if the destruction order is
wonky (as seen in PyQt5), the thread could still be running when the
plugins were already unloaded.
With the loader a member variable, it gets destroyed when the thread
stops.
Note: in Qt 5.7, QFactoryLoader no longer unloads the plugins (since
commit 494376f980e96339b6f1eff7c41336ca4d853065), so this crash cannot
happen in that version.
[ChangeLog][QtNetwork][Bearer management] Fixed a bug that could cause a
crash on application exit, depending on the order of destruction of the
QCoreApplication object and the QtDBus manager thread.
Task-number: QTBUG-56228
Task-number: QTBUG-52988
Change-Id: I33dc971f005a4848bb8ffffd147853376f82de2a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/doc')
0 files changed, 0 insertions, 0 deletions