Go to file
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
bin syncqt: Don't check for QT_{BEGIN,END}_HEADER macros 2013-01-26 18:18:46 +01:00
config.tests Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
dist Mention the new MEMBER attribute in the changelog 2013-01-28 23:05:39 +01:00
doc Remove left-overs of QT_{BEGIN,END}_HEADERS 2013-01-31 20:08:58 +01:00
examples Keep QLineEdit placeholder text visible when focused 2013-02-01 16:13:12 +01:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Refactor QEglFSPandaHooks and add physicalScreenSize() 2013-01-30 13:00:02 +01:00
qmake consolidate generation of metafile install targets 2013-01-25 23:30:50 +01:00
src Improve QLibrary global destruction 2013-02-02 10:35:22 +01:00
tests QTreeView::expandToDepth - add missing emit of expanded and collapsed 2013-02-02 08:10:55 +01:00
tools configure.exe: Fix line feed character 2013-01-25 00:40:17 +01:00
util Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Add qmake generated files to .gitignore. 2012-12-19 21:31:58 +01:00
.qmake.conf don't auto-install example sources by default for all modules 2012-12-03 15:56:28 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Introduce a native color dialog for GTK+ 2.x 2013-02-01 19:39:31 +01:00
configure.bat Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL fix links in INSTALL 2012-10-10 08:45:22 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtbase.pro rewrite default spec handling 2012-11-01 20:17:57 +01:00
sync.profile syncqt: Don't check for QT_{BEGIN,END}_HEADER macros 2013-01-26 18:18:46 +01:00