[Development] Another integer typedef OR how to prepare for 64-bit in Qt 5

André Pönitz apoenitz at t-online.de
Mon Dec 3 20:43:17 CET 2018


On Mon, Dec 03, 2018 at 11:02:31AM +0100, Giuseppe D'Angelo via Development wrote:
> Il 03/12/18 00:01, Thiago Macieira ha scritto:
> > > Has anyone actually tried changing size_type to a 64bit datatype, and
> > > checking how many warnings start appearing in user code? (E.g. just try
> > > with QString, QList, QVector; and build Creator, or some KDE libs). I've
> > > got the gut feeling that it will be an absolutely gigantic number,
> > > especially on Windows...
> > Not yet. Yes, it will be a huge number.
> 
> Which compels the questions:
> 
> 1) is it worth it?

No. 

It's really rare to need a container of that size in a Qt context,
and if one does, there's always std:: containers - which are likely
to be used at sizes much smaller than INT_MAX anyways.

> 2) should we offer users some way (configure time switch, template
> parameter, ...) to keep int-based indexes and avoid all these warnings while
> they fix their code to use a ssize_t-like index?

Not needed when 1) is resolved as 'No.'

Andre'




More information about the Development mailing list