qt5base-lts/src
Thiago Macieira 288d3aceee Improve QLibrary global destruction
The previous solution was a global static, which got deleted at the end
of the execution of the application or at QtCore unload, whichever came
first. Unfortunately, the end of the execution often came first, which
is inconvenient: it means the global was deleted before all atexit
functions were run, including some QLibrary destructors.

Consequently, some QLibrary destructors did not reach the global data
and were thus unable to unload their libraries or delete their data
properly. The previous solution leaked.

This solution instead uses a Q_DESTRUCTOR_FUNCTION, which makes a
requirement to destroy only at QtCore unload time. Thus, we're sure that
all references have been dropped.

Additionally, during the cleanup, do try to unload the libraries that
have a single reference count left. That means either a QLibrary that
was destroyed without unload(), or a use of the static QLibrary::resolve
functions.

Change-Id: I12e0943b0c6edc27390c103b368d1b04bfe7e302
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-02 10:35:22 +01:00
..
3rdparty Doc: Fix module name format 2013-01-25 17:27:44 +01:00
angle Fix linking ANGLE on MinGW-w64 64-bit 2012-12-20 14:23:57 +01:00
concurrent Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
corelib Improve QLibrary global destruction 2013-02-02 10:35:22 +01:00
dbus Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
gui Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
network Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
opengl Drop the unused qt_gl_convertToGLFormat function 2013-01-29 21:58:20 +01:00
platformsupport Introduce a native color dialog for GTK+ 2.x 2013-02-01 19:39:31 +01:00
plugins Introduce a native color dialog for GTK+ 2.x 2013-02-01 19:39:31 +01:00
printsupport Remove QT_{BEGIN,END}_HEADER macro usage 2013-01-29 01:06:04 +01:00
sql Remove dependency of DB driver headers on qsqlcachedresult_p.h. 2013-02-01 14:13:32 +01:00
testlib Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
tools Remove left-overs of QT_{BEGIN,END}_HEADERS 2013-01-31 20:08:58 +01:00
widgets QTreeView - optimize. Do not do signals-work if signals are blocked 2013-02-02 08:11:00 +01:00
winmain Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
xml Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-29 11:33:35 +01:00
src.pro Add ANGLE as a 3rdparty library to Qt. 2012-10-24 02:29:15 +02:00