[Development] Proposing to change https://wiki.qt.io/API_Design_Principles#Enums_in_classes to require scoped enums

Allan Sandfeld Jensen kde at carewolf.com
Fri Jan 17 16:49:51 CET 2025


On Thursday 16 January 2025 12:31:30 Central European Standard Time Tor Arne 
Vestbø via Development wrote:
> > On Jan 16, 2025, at 11:56, Marc Mutz via Development
> > <development at qt-project.org> wrote:
> > is a very _un_-Qt-ish one. In Qt, we believe that brevity does not 
> > automatically equal readability¹, and the more explicit
> > 
> >> if (point.state() == TouchPoint::State::Pressed)
> > 
> > is more (but certainly not less) readable than
> > 
> >> if (point.state() == TouchPoint::Pressed)
> 
> 
> The latter is more readable to me due to lack of redundant information
> (“State::”)
 
I agree, and this was a cherry-picked best case.

Best regards
Allan




More information about the Development mailing list