On Saturday, 11 March 2023 00:48:10 PST A. Pönitz wrote: > Unfortunately for myself (and I am ready to take some blame for this > ignorance) there was this parallel, and for me on first sight unrelated, > development of the Q*View zoo, that started to set sizeof(qsizeype) == > sizeof(std::size_t) in stone and which currently seems to be the main > obstacle to have a configurable sizeof(qsizetype). It is surely possible > (and in my view sensible) to have sizeof(Q*View::size_type) == > sizeof(std::size_t) *while keeping* qize_type == int), but I wouldn't bet > on this kind of outcome.
Not just size_t, and I don't think it's even the most important match. A lot of code in Qt 6 has begun assuming that sizeof(qsizetype) == sizeof(void *). That is, they are using qsizetype interchangeable with quintptr and qintptr. The view classes you're referring to above are not the only example; they may be the most visible one and thus the most correctable if we wanted to change, but it's very likely that there are many more hidden such uses inside the code that would just corrupt pointers left and right. This is why I replied to Matthias that changing this is going to be more work than keep going now. -- Thiago Macieira - thiago.macieira (AT) intel.com Cloud Software Architect - Intel DCAI Cloud Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development