On Wed, Mar 16, 2016 at 10:57 AM, Giuseppe D'Angelo < giuseppe.dang...@kdab.com> wrote:
> Il 16/03/2016 17:24, charleyb123 . ha scritto: > >> Current slot implementation bridges runtime-reflection capabilities >> (provided by QMetaObject), and provides the thread-safe event queue that >> bridges "slot-execution" to occur on the "target-thread" for which the >> "target-QObject" has "affinity". Lambdas alone cannot do this -- some >> kid of "event-queue" would be required that is "thread-aware" (yes, >> could be provided through a library of some kind, that happens to be >> what Qt is doing). >> > > This thread wasn't talking about lambdas, rather about the "old" connect > syntax (SIGNAL/SLOT based) vs the "new" one (PMF based). > > Anyhow, since you brought lambdas into discussion, you can pass an > affinity object for them as well: > > https://doc.qt.io/qt-5/qobject.html#connect-5 >> > > Ah, thanks: I misunderstood the thread topic (sorry). ;-) Agree that I don't have a use case for the "old" connect syntax anymore (fine with me to deprecate it). I prefer catching errors at compile-time with the new syntax. I've "overheard" some discussions in other circles about ditching all of signal/slot in favor of lambdas, and apologies for dragging that into the discussion. It's something I've been thinking about a lot ... ;-) --charley
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest