Go to file
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
bin Fix qpa legacy headers installation 2012-05-09 06:42:25 +02:00
config.tests Remove all references to X11 session management 2012-06-01 03:15:55 +02:00
dist Windows: Add ANGLE support. 2012-05-31 09:13:01 +02:00
doc Remove the MacMainWindow example. 2012-05-30 01:54:45 +02:00
examples Fix digiflip example build. 2012-05-31 02:06:42 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs eglfs: implement hardware cursor for the raspberry-pi 2012-06-01 15:22:49 +02:00
qmake qmake can not process project file with UTF-8 BOM 2012-05-30 01:54:45 +02:00
src Add private API for working with meta-methods in signal index range 2012-06-01 16:04:04 +02:00
tests Add private API for working with meta-methods in signal index range 2012-06-01 16:04:04 +02:00
tools Move the sub-architecture feature to better places in qmake 2012-05-31 17:55:49 +02:00
util Move ScriptSentinel enum from header to .cpp 2012-05-25 21:48:44 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add imports directory to ignore list 2012-04-11 01:42:12 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure Move the sub-architecture feature to better places in qmake 2012-05-31 17:55:49 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Remove all references to X11 session management 2012-06-01 03:15:55 +02:00
sync.profile Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00