Go to file
Thiago Macieira 58d9b42c03 Fix deadlock on disconnectNotify() called from ~QObject
Normally, disconnectNotify() is called at the end of QObject::disconnect
and all the locks have been dropped. That is not the case for the
QObject destructor, so we need to deal with the fact that it there may
be some locks held.

I didn't catch this issue during testing because it depends on the
pointer addresses of the object being destroyed and that of the
QDBusAbstractInterface sender object, as we use one global, non-
recursive mutex pool. For the same reason, this patch is not testable.

The fix is simple: we don't need to remove the relay rules immediately.
It's ok for them to happen later, since the worst case scenario is that
we'll receive a few more signals than we have objects to deliver them
to. If that happens, we'll do a little more work than we have to. But in
the normal case, the amount of work is the same and we get the benefit
of returning more quickly from the destructor. What's more, if the
QDBusAbstractInterface object also gets destroyed, the events are
deleted and QDBusConnectionPrivate will clean everything up.

Task-number: QTBUG-48410
Change-Id: I42e7ef1a481840699a8dffff1406b789ba5217b3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-25 07:45:06 +00:00
bin fixqt4headers.pl: Improve detection of Qt 5 location. 2015-04-22 10:23:41 +00:00
config.tests Auto-detect whether 64-bit std::atomic really works 2015-09-22 22:46:08 +00:00
dist Update the changelog with the LTS discussion results 2015-06-25 15:58:28 -07:00
doc Doc: Update 'Creating a Mobile Application' external link 2015-09-21 15:20:26 +00:00
examples Fix up QOpenGLWidget transparency support 2015-09-24 12:51:37 +00:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Use QMAKE_MOD_LEX/QMAKE_MOD_YACC in lex/yacc features 2015-09-24 13:49:29 +00:00
qmake fix race in debug_and_release builds of static libs for Unix 2015-09-22 14:12:32 +00:00
src Fix deadlock on disconnectNotify() called from ~QObject 2015-09-25 07:45:06 +00:00
tests QScreen manual test: don't crash when a QScreen is null 2015-09-24 20:15:35 +00:00
tools Auto-detect whether 64-bit std::atomic really works 2015-09-22 22:46:08 +00:00
util Fix typo when resolving EGL extension. 2015-04-23 11:54:36 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Remove qtdemo from gitignore 2014-09-17 12:38:55 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Auto-detect whether 64-bit std::atomic really works 2015-09-22 22:46:08 +00:00
configure.bat Use jom instead of nmake to compile configure.exe 2015-07-21 22:50:30 +00:00
header.BSD Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
header.FDL Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL3-COMM Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL21 Update copyright headers 2015-02-11 06:49:51 +00:00
header.LGPL-ONLY Update copyright headers 2015-02-11 06:49:51 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv3 fix up license references 2015-08-13 11:13:09 +00:00
LICENSE.LGPLv21 Update copyright headers 2015-02-11 06:49:51 +00:00
LICENSE.PREVIEW.COMMERCIAL Update copyright headers 2015-02-11 06:49:51 +00:00
qtbase.pro Avoid qtbase/bin/bin artifact when running make install 2015-06-03 04:27:49 +00:00
sync.profile Move the function helper to its own file 2015-06-05 07:48:17 +00:00