QObject: don't hold mutex when copying arguments in a QueuedConnection
authorOlivier Goffart <ogoffart@woboq.com>
Sat, 5 Jul 2014 14:24:17 +0000 (16:24 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Mon, 7 Jul 2014 06:45:56 +0000 (08:45 +0200)
commitd49f7168aba2770cc39d463adeeffc4e9635f4dc
treed0c00b3ebfd5241535de6cf6cc86b465919c971d
parent7e488626ab484ef8f62be6f80791a0b3adae80ab
QObject: don't hold mutex when copying arguments in a QueuedConnection

QMetaType::create can call user code and we should not keep mutex held as
this may cause dead lock.

Make sure the tst_qobjectrace actually emit some signal so the test check
there is no race if the receiver object is destroyed while
the mutex is unlocked.

Task-number: QTBUG-39990
Change-Id: I56ca1ae7a11cd7b33c1a68727370972862e11c2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/kernel/qobject.cpp
tests/auto/corelib/kernel/qobject/tst_qobject.cpp
tests/auto/other/qobjectrace/tst_qobjectrace.cpp