moc: Only generate IndexOfMethod for signals.
authorOlivier Goffart <ogoffart@woboq.com>
Sat, 25 Feb 2012 19:48:56 +0000 (20:48 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 28 Feb 2012 11:36:40 +0000 (12:36 +0100)
commit0d9714f44549bf2e3a39d5c9833a4744cc3e6410
treec6025119e6b912b36419292e770c7868e87a845f
parent457606d12b13025970af2e36c640bb1f1e8f89d6
moc: Only generate IndexOfMethod for signals.

moc is currently generating code to convert from a pointer to member
function of a slot or signal to its index.

The idea was that it could be usefull for slots to have the new syntax
do the same as the old one (connecting signal index to slot index). But
in practice, the new syntax do not use the IndexOfMethod for slots.

Also, it does not work for all the slots (no Q_PRIVATE_SLOT,
no static slots)

So since it is not used, and that it would take room in the binaries to
generate all the code to get the index of slots, we remove it.

If ever we need it, we can still add it later.

Change-Id: Ia417e3e524d7915ca86433ea86c66ac2b299c81a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
src/tools/moc/generator.cpp
tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp