On Thursday, 27 February 2020 21:51:18 CET Matthew Woehlke wrote:
> On 26/02/2020 07.42, Tor Arne Vestbø wrote:
> > As others have argued, a signal is not special, in the sense that any
> > function can do anything, including emitting signals, so annotating it
> > doesn’t seem critical, as we apparently are fine without in all other
> > cases.
> Taking a step back... I think some of the reason for the current
> situation has to do with API design. Which of these is easier to understand?
> 
>   if (map.empty())
>     emptied();
> 
> - vs. -
> 
>   if (map.isEmpty())
>     emit emptied();
> 
> One reads like plain English. The other is missing words in a way that
> can confuse readers.

That is how I see it too. It essentially violates Qt code guidelines. If it 
was a normal method we would name it "emitEmptied()", so far we have just 
lived with "emit emptied()" instead.

'Allan



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

Reply via email to