On Fri, 21 Feb 2020 15:00:53 +0200
Ville Voutilainen <ville.voutilai...@gmail.com> wrote:

> On Fri, 21 Feb 2020 at 14:58, Sérgio Martins <sergio.mart...@kdab.com> wrote:
> > > Why do I need to know that it's a signal being emitted? How is that
> > > "vital information"? I could just as well
> > > invoke any other callback, but I find myself not exactly yearning for
> > > being able to write
> > > callback somethingHappened();
> >
> >
> > Signals have different semantics than regular functions.
> 
> In what way?

They typically call back into "upper layers", which is worth considering on the 
calling side, e.g. due to the danger of inconsistent state getting accessed if 
you don't emit the signal at the end of a function, to name just one tyical 
pitfall.
I, for one, definitely want to see whether I am emitting a signal or not.


Christian
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to