On Mon, Sep 26, 2011 at 11:02 AM, Olivier Goffart <[email protected]> wrote:
> On Monday 26 September 2011 15:40:01 Thiago Macieira wrote:
>> I know an asynchronous API is much harder to deal with and leads to more
>> complex code.
>
> Not necessarily...
>
> connect (manager->get(QNetworkRequest(url)), &QNetworkReply::finished, [=](){
>                QByteArray content = 
> qobject_cast<QNetworkReply*>(sender())->readAll();
>                parse(content);
>        });
>
>
>
> That is, using C++11 lambda and the proposed conneciton syntax:
> http://developer.qt.nokia.com/wiki/New_Signal_Slot_Syntax#45f5369b0d8445adbaf54cd74a36b823

I think this new C++11 lambda feature should be used wisely.
Personally, I wouldn't like to see many of these blocks in a source code.

Br,
Adriano
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to