qt5base-lts/tests/auto/corelib
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
..
animation normalise signal/slot signatures [QtCore tests] 2012-10-22 03:21:01 +02:00
codecs Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
global QFlags: use unsigned int when the enum's underlying is unsigned 2012-09-28 23:50:10 +02:00
io fix error handling bug in QWindowsPipeReader 2012-11-02 12:16:49 +01:00
itemmodels Add implementations of QAIM::sibling in public APIs. 2012-11-02 16:25:02 +01:00
json test: Rename test case name TestQtJson -> tst_QtJson 2012-10-24 01:39:02 +02:00
kernel Allow connect to functors with less parameters than the signal 2012-11-06 18:43:14 +01:00
mimetypes test: Moving tst_QMimeDatabase::inheritsPerformance() test 2012-10-31 19:56:42 +01:00
plugin Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
statemachine normalise signal/slot signatures [QtCore tests] 2012-10-22 03:21:01 +02:00
thread Fix for leak in QFuture 2012-11-01 16:09:29 +01:00
tools Improve QByteDataBuffer::read() performance with partial reads 2012-11-03 00:24:37 +01:00
xml Remove duplicate words and punctuation from documentation. 2012-09-26 04:03:20 +02:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00