[Development] Another integer typedef OR how to prepare for 64-bit in Qt 5
apoenitz at t-online.de
Fri Nov 2 10:26:07 CET 2018
On Fri, Nov 02, 2018 at 08:52:07AM +0000, Lars Knoll wrote:
> > On 2 Nov 2018, at 09:02, André Pönitz <apoenitz at t-online.de> wrote:
> > On Thu, Nov 01, 2018 at 08:42:52PM -0700, Thiago Macieira wrote:
> >> What do we do?
> >> Option 1: do nothing, wait for Qt 6 and do the change then
> >> Option 2: insert #if in our API, starting now
> >> Option 3: use #if per class, starting now
> >> Option 4: create a central #if and use this new type, starting now
> > Option 5: Leave as-is, also in Qt 6.
> > Known and bearable effort to handle the recurring 'why do you use
> > int?' threads.
> > No effort for existing users, which otherwise will face lots
> > of size mismatch warnings in their code.
> And the drawback, that people can’t use large data sets with our containers.
For large data sets the Qt containers usually aren't a good choice
anyway, as the trade-off of the implicit sharing is often not worth
it in that case.
> The size mismatch warnings users will get in Qt 6 are IMO not a huge
> issue. The narrowing to a smaller size does not break compatibility,
> as long as no container overflows in size (which it couldn’t with
> code based on Qt 5).
> So my vote actually goes for option 4. We introduce a central type
> that’s int in Qt 5, qsizetype in Qt 6, and start using it. That allows
> us to introduce it then class by class and fix any issues we find
> around it.
*shrug* I won't fight such a solution, but reserve the right to say
"told you so" every now and then. 1/2 ;-)
More information about the Development