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

2012-11-02 Thread Thiago Macieira
On sexta-feira, 2 de novembro de 2012 09.41.06, Olivier Goffart wrote: > > 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. > > Because for regular functions slot, I can knw that.The arguments

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

2012-11-02 Thread Stephen Kelly
On Friday, November 02, 2012 00:23:43 Olivier Goffart wrote: > One hack could be to remove the QPrivateSignal type from the Argument list > in the second template parametter of QFunctorSlotObject. The candidate fix for this is here: https://codereview.qt-project.org/#change,38703 Thanks, -- S

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

2012-11-02 Thread Olivier Goffart
On Thursday 01 November 2012 17:32:20 Thiago Macieira wrote: > 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

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

2012-11-01 Thread Thiago Macieira
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 possibl

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

2012-11-01 Thread Olivier Goffart
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 S

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

2012-11-01 Thread Stephen Chu
On 11/1/12 4:28 PM, Thiago Macieira wrote: > On quinta-feira, 1 de novembro de 2012 13.13.34, Thiago Macieira wrote: >> On quinta-feira, 1 de novembro de 2012 14.49.27, Stephen Chu wrote: >>> Again. This is using clang 3.1 with QMAKE_CXXFLAGS += -std=c++11 >> >> Is that the real clang 3.1, or the 3

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

2012-11-01 Thread Thiago Macieira
On quinta-feira, 1 de novembro de 2012 13.13.34, Thiago Macieira wrote: > On quinta-feira, 1 de novembro de 2012 14.49.27, Stephen Chu wrote: > > Again. This is using clang 3.1 with QMAKE_CXXFLAGS += -std=c++11 > > Is that the real clang 3.1, or the 3.1 version of Apple clang? They are not > the s

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

2012-11-01 Thread Stephen Chu
On 11/1/12 4:13 PM, Thiago Macieira wrote: > On quinta-feira, 1 de novembro de 2012 14.49.27, Stephen Chu wrote: >> Again. This is using clang 3.1 with QMAKE_CXXFLAGS += -std=c++11 > > Is that the real clang 3.1, or the 3.1 version of Apple clang? They are not > the same, they have different C++11

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

2012-11-01 Thread Thiago Macieira
On quinta-feira, 1 de novembro de 2012 14.49.27, Stephen Chu wrote: > Again. This is using clang 3.1 with QMAKE_CXXFLAGS += -std=c++11 Is that the real clang 3.1, or the 3.1 version of Apple clang? They are not the same, they have different C++11 support status and known bugs. -- Thiago Macieir

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

2012-11-01 Thread Stephen Chu
On 11/1/12 1:17 PM, Thiago Macieira wrote: > On quinta-feira, 1 de novembro de 2012 13.03.56, Stephen Chu wrote: >> I find out what QPrivateSignal is for but it's not clear if lambda can >> still be used to connect to such private signals. >> >> If I connect QTimer::timeout() to a slot that takes n

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

2012-11-01 Thread Thiago Macieira
On quinta-feira, 1 de novembro de 2012 13.03.56, Stephen Chu wrote: > I find out what QPrivateSignal is for but it's not clear if lambda can > still be used to connect to such private signals. > > If I connect QTimer::timeout() to a slot that takes no argument, it > compiles fine. But when I try

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

2012-11-01 Thread Stephen Chu
I find out what QPrivateSignal is for but it's not clear if lambda can still be used to connect to such private signals. If I connect QTimer::timeout() to a slot that takes no argument, it compiles fine. But when I try to connect to a lambda function without any argument, the results in the men