[Development] What to do with qrand/qsrand?

Thiago Macieira thiago.macieira at intel.com
Wed Jun 14 07:50:33 CEST 2017


On terça-feira, 13 de junho de 2017 22:34:52 PDT Olivier Goffart wrote:
> > With this many references, I'm not sure we should even add a QT_DEPRECATED
> > warning to it, since that would make trigger-happy "warning--" developers
> > in KDE wholesale moving to something else.
> 
> Can you elaborate? Why would that be a bad thing?

Because I've seen this type of commit, going way back to the Qt 4 porting 
days. Instead of taking the time to port, as time goes by, as code is 
refactored, with patience and testing, we'll have a rush of "warning--" 
commits that just change the code to use something different without 
understanding what it does.

For example, as QRandomGenerator's documentation says, it should not be used 
for bulk data. But I fear people will use it for that.

> > Options:
> >  1) do nothing, leave as-is (in Qt 6, use thread_local)

At this point, and after talking to Lars, I'm thinking of just leaving it 
alone. So option (1).

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list