On Fri, 21 Feb 2020 at 13:52, Julien Cugnière <julien.cugni...@gmail.com> wrote:
>
> Le ven. 21 févr. 2020 à 12:29, Giuseppe D'Angelo via Development
> <development@qt-project.org> a écrit :
> >
> > Il 21/02/20 12:15, Ville Voutilainen ha scritto:
> > >> without any annotation is not what we want. We'd miss vital information 
> > >> and reduce readability.
> > > Can you please explain what that vital information is?
> >
> > That control is leaving the "local" function, and *anything* can happen
> > at that point. Including fun stuff, like finding "this" to be deleted
> > (pgrep for QPointer.*this in QWidget code). It's an important annotation
> > for a developer IMNSHO.
>
> Isn't that true of any function call though ? Any function could end
> up deleting this, or trigerring code in another thread, or anything.
> For example, a normal function call could end up emiting a signal, and
> as such, any function could be as dangerous as a signal.

Indeed. I'm still waiting for an explanation for the need for emit. I
am trying as hard as I can
to spot such a need, and failing. The apparent need is riding on a
hypothesis that signals
are special, but they aren't. They are just like all other functions,
albeit generated functions,
but in that sense no different from other functions that you didn't write.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to