Re: [Interest] Using connect/disconnect with lambdas

2018-02-19 Thread Thiago Macieira
On Sunday, 18 February 2018 20:59:50 PST Tom Isaacson via Interest wrote: > I'm replacing some old SIGNAL/SLOT connects with the new Qt5 format and I > need to use lambdas for some of them. > > Scenario 1: > > public slots: > void RouteEditName(); > void RouteEditName(QString name); > >

Re: [Interest] Using connect/disconnect with lambdas

2018-02-19 Thread Benjamin TERRIER
2018-02-19 5:59 GMT+01:00 Tom Isaacson via Interest : > I'm replacing some old SIGNAL/SLOT connects with the new Qt5 format and I > need to use lambdas for some of them. > > Scenario 1: > > public slots: > void RouteEditName(); > void RouteEditName(QString name); > > m_pRouteEditNameAc

Re: [Interest] Using connect/disconnect with lambdas

2018-02-19 Thread Pierre-Yves Siret
2018-02-19 5:59 GMT+01:00 Tom Isaacson via Interest : > I'm replacing some old SIGNAL/SLOT connects with the new Qt5 format and I > need to use lambdas for some of them. > > Scenario 1: > > public slots: > void RouteEditName(); > void RouteEditName(QString name); > > m_pRouteEditNameAc

Re: [Interest] Using connect/disconnect with lambdas

2018-02-18 Thread Nikos Chantziaras
On 19/02/18 06:59, Tom Isaacson via Interest wrote: But how do I disconnect a lambda? disconnect(m_pRouteEditNameAct, &tAction::triggered, this, [this]() { RouteEditName(); }); This seems like it's trying to disconnect from a different lambda to the one I originally connected to. Store

[Interest] Using connect/disconnect with lambdas

2018-02-18 Thread Tom Isaacson via Interest
I'm replacing some old SIGNAL/SLOT connects with the new Qt5 format and I need to use lambdas for some of them. Scenario 1: public slots: void RouteEditName(); void RouteEditName(QString name); m_pRouteEditNameAct = new tAction(tr("Name route") + "...", this); connect(m_pRouteEd