qt5base-lts/tests/auto/corelib/kernel
Olivier Goffart 029cc40c2a Allow connect to functors with less parameters than the signal
Before, the functor slot (or lambda expression) had to have the same amount
of arguments as the signal.
This shown to be a big problem to be able to connect to signals that had
a QPrivateSlot.

This implementation use the type of the operator() of the functor to
know how many arguments we have.
As a bonus, we also can check the arguments in a static assert.

The test comes from https://codereview.qt-project.org/#change,38703
But this patch also works without variadic template

If the compiler does not support decltype, we workaround the lack of it
by using another level of indirection.

Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-06 18:43:14 +01:00
..
qcoreapplication Test: remove QSKIP in tst_QCoreApplication::argc 2012-10-16 15:29:15 +02:00
qeventdispatcher Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qeventloop Test: remove QSKIP in tst_QEventLoop::throwInExec() 2012-10-29 13:57:09 +01:00
qmath Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmetamethod Core/kernel: Make some signals private. 2012-10-25 15:56:14 +02:00
qmetaobject Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmetaobjectbuilder Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmetaproperty Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmetatype Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmimedata Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qobject Allow connect to functors with less parameters than the signal 2012-11-06 18:43:14 +01:00
qpointer Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qsignalmapper normalise signal/slot signatures [QtCore tests] 2012-10-22 03:21:01 +02:00
qsocketnotifier Test: remove QSKIP from tst_QSocketNotifier::posixSockets 2012-10-16 20:43:37 +02:00
qsystemsemaphore move QSystemSemaphore autotest from qtscript to qtbase 2012-11-01 15:59:58 +01:00
qtimer Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtranslator Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qvariant Make documentation of QVariant::isNull more explicit. 2012-09-29 02:31:35 +02:00
qwineventnotifier Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
kernel.pro Add autotest for QMetaMethod introspection 2012-02-15 17:27:04 +01:00