qt5base-lts/tests/auto/corelib/kernel
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
..
qcoreapplication Make the event notification on Windows be mandatory in all dispatchers 2012-05-04 12:44:14 +02:00
qeventdispatcher Test posted events in tst_QEventDispatcher with various flags 2012-02-10 15:22:11 +01:00
qeventloop Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qmath Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qmetamethod Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qmetaobject Add private API for working with meta-methods in signal index range 2012-06-01 16:04:04 +02:00
qmetaobjectbuilder Fixed uninitialized memory in QMetaObjectBuilder::fromRelocatableData 2012-05-01 09:41:27 +02:00
qmetaproperty Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qmetatype tst_qmetatype: avoid slow compilation with some MSVC2010 2012-05-24 07:14:40 +02:00
qmimedata Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qobject Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qpointer Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qsignalmapper Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qsocketnotifier Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qtimer Merge "Merge remote-tracking branch 'origin/api_changes'" into refs/staging/master 2012-04-17 13:09:29 +02:00
qtranslator Make QTranslator testcase independent of Widgets 2012-03-28 00:44:16 +02:00
qvariant Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
qwineventnotifier Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
kernel.pro Add autotest for QMetaMethod introspection 2012-02-15 17:27:04 +01:00