qt5base-lts/tests/auto/corelib
Kent Hansen 37db43f1c2 Add private API for working with meta-methods in signal index range
Internally, QObject and QMetaObject already leave out non-signal
methods when working with signals. This is possible because the
signals always come before other types of meta-method in the
meta-object data. Ignoring irrelevant methods is faster and can
save memory.

QMetaObject provides internal indexed-based connect() and
disconnect() functions. However, these functions currently take an
absolute method index as the signal specifier, instead of an
absolute _signal_ index. Hence, QMetaObject and friends must convert
from the method index range to the signal index range.

By providing an API that only considers signal indices, clients of
the index-based QMetaObject::connect()/disconnect() can provide the
proper signal index directly. Similarly, for the qtdeclarative
integration (QDeclarativeData hooks) the signal index can be passed
directly. This will eliminate most of the conversions back and forth
between signal index and method index, and some other redundant work
done by qtdeclarative's custom connection implementation.

There are some places where the behavior can't be changed; for
example,  QObject::senderSignalIndex() will still need to return an
index in the method range, since that function is public API.

Changing QMetaObject::connect()/disconnect() to take an index in
the signal range will be done in a separate commit; this commit is
only an enabler for porting existing usage of those functions to
the new behavior.

Change-Id: Icb475b6bbdccc74b4e7ee5bf72b944b47159cebd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-01 16:04:04 +02:00
..
animation Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
codecs Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
global Add Q_UINT64_C to 64 bit integer literal. 2012-05-15 23:03:23 +02:00
io Make tst_qtextstream parallel-safe. 2012-05-31 05:37:25 +02:00
itemmodels Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
json Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
kernel Add private API for working with meta-methods in signal index range 2012-06-01 16:04:04 +02:00
mimetypes Removed CONFIG+=parallel_test from suspected parallel-unsafe tests [2] 2012-05-23 03:17:59 +02:00
plugin Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
statemachine Improved stability of tst_qstatemachine, mark as parallel-safe 2012-05-31 05:37:25 +02:00
thread Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
tools Fix a bug in the case conversion code 2012-06-01 13:11:50 +02:00
xml Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00