Use std::size_t for rowCount() and columnCount() values.
This aids in 64bit portability when mixing with the Standard C libraries and STL. It removes the need to use static_cast< int > all over the place to avoid compiler wanings.
Could even follow the standard convention of using the size_type class typedef.
Updated by Koen Deforche almost 11 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
The discussion of int versus unsigned, and by expansion std::size_type, is indeed not trivial, but the problem is that we cannot simply change this now (since this breaks custom model implementations).
If we would be able to break (or do this change without breaking ?) then, probably yes I would be inclined to follow here more STL-conventions (versus Qt-conventions).