[Development] [Interest] Qt5: Problem connecting QTimer::timeout() to lambda

Thiago Macieira thiago.macieira at intel.com
Fri Nov 2 01:32:20 CET 2012


On sexta-feira, 2 de novembro de 2012 00.23.43, Olivier Goffart wrote:
> Hi,
> 
> It is the QPrivateSignal that is breaking it.
> 
> It is only possible to connect to functor (lambda are functor) if they have
> the same number of arguments.  The number need to match exactly, and it is
> not possible to omit any. (so you may not omit the QPrivateSignal argument)
> Using C++11 new SFINAE rules, it should be possible to change that.
> 
> One hack could be to remove the QPrivateSignal type from the Argument list
> in the second template parametter of QFunctorSlotObject.

Why doesn't the code use the number of arguments from the receiver instead of 
the sender? We did that for regular functions and member functions.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121101/df33588e/attachment.sig>


More information about the Development mailing list