[Development] QtCS2019 Notes: QtCore

André Pönitz apoenitz at t-online.de
Sun Nov 24 11:50:31 CET 2019


On Sun, Nov 24, 2019 at 11:30:29AM +0100, Giuseppe D'Angelo via Development wrote:
> Il 24/11/19 10:44, Uwe Rathmann ha scritto:
> > I fully agree with André - having 2 different APIs makes a lot of sense
> > to me. But instead of using count/size I would use something like
> > countU/sizeU. like you have QPen::widthF and QPen::width.
> 
> I disagree: it makes the API confusing. The F there stands for floating
> point, as opposed to integer (and historically you don't even know _which_
> floating point you get). What would the U stand for exactly?

Well, _some_ placeholder for a suffix. '32' might be explicit, but awkward.

My idea with using 'count' was that we currently have three functions
doing the same (size, count, length), and giving one more of them
a real meaning would be ok. But as I said before, you have a point
that the situation is there as well for indexOf() etc.

A suffix on all interesting function would allow more uniformity than
just having the one special case for getting the size.

Andre'


More information about the Development mailing list