qt5base-lts/tests/auto/corelib/kernel/qobject
Kent Hansen d359b0af2b Call QObject::disconnectNotify() when receiver is destroyed
Store the signal index in QObjectPrivate::Connection, thereby making
it available in "implicit" disconnect contexts (i.e., receiver
deletion).

This change does not cause the size of QObjectPrivate::Connection
to grow (still 40 bytes on 32-bit Linux, 72 bytes on 64-bit Mac).

Valgrinding the new benchmark indicates that the percentage of the
time spent in the QObject destructor increased from 7.8% to 8.4%
on ia32, for that particular stress test; the increase is the
combined cost of calling metaObject(), QMetaObjectPrivate::signal(),
and disconnectNotify() for one connection. In practice, the measured
wallclock time increased by about 3ms for a 500ms run (which
repeatedly constructs, connects, and destroys an object).

Task-number: QTBUG-4844

Change-Id: I1beb01c753f31542fc0acb62edb4c6d165fcc5b4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-28 14:44:20 +02:00
..
signalbug Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtCore] 2012-05-04 12:45:47 +02:00
test Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
.gitignore QObject-test: Reorganize subprocess. 2011-12-14 07:07:09 +01:00
qobject.pro Fixed tst_qobject signalbug silently not compiled in -fast builds. 2012-02-23 09:06:44 +01:00
tst_qobject.cpp Call QObject::disconnectNotify() when receiver is destroyed 2012-06-28 14:44:20 +02:00