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.
Also, this restricts the indexes, sizes, aso to 32-bit.
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.

My proposal is to replace all int types with size_t where appropriate.

I realise that this has a major impact on compatibility, but it is certainly 
something that should be considered.
A solution to the compatibility problem could be to duplicate the methods and 
mark the old ones as obsolete.

What are your thoughts?

/Kurt
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to