On terça-feira, 24 de dezembro de 2013 19:26:27, Kurt Pattyn wrote: > QString, QByteArray, QList, aso often use sign integers to store sizes, > indexing, aso. This often leads to signed/unsigned mismatches and is not > really according standard practice.
No, they don't. That's why we use int everywhere: no mismatch if they're all the same type. > Also, this restricts the indexes, sizes, aso to 32-bit. Right. > One solution to resolve the signed/unsigned mismatch is to cast the types to > the appropriate type, but this can be dangerous, and hides the real > problem. > > A better approach would be to use std::size_t. Not going to happen. This has been discussed time and again. We don't want it, it's not going to be done in Qt. Please check the discussions about this from two years ago. > My proposal is to replace all int types with size_t where appropriate. Maybe Qt 7. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
