[Development] QtCS2019 Notes: QtCore

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Fri Nov 22 20:01:30 CET 2019


Il 22/11/19 18:49, Thiago Macieira ha scritto:
> We decided not to add q6sizetype. Just add a "### Qt6: qsizetype" comment
> where you can't use qsizetype in Qt 6. We'll deal with conflicts.

Sorry, what do you mean by "conflicts"? I mean that there's countless 
code today that uses "int s = foo.size()" (or indexOf, or similar); such 
code will now trigger narrowing warnings.


> There's always QVector<T>::size_type, QByteArray::size_type and
> QString::size_type if you really need to be explicit and that's fine today.

The chance that non-generic code uses this is practically 0 and we know 
it. Yes, "auto" will work, but still has anyone actually did the 
exercise on a big codebase (Creator, KDE, ...) and checked how many 
warnings are we talking about?

Thanks,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20191122/29070d96/attachment-0001.bin>


More information about the Development mailing list