Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104825

Finish migration to qsizetype [GUI: <rest>]



    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • GUI: Other
    • None


      Let's be honest: the change from int to qsizetype sizes in Qt 6.0 was more than rushed. Half the API and a good chunk of implementation code is still using int when it should be using qsizetype, and we have been papering over this issue by making qMin() allow mixed-type arguments and, apparently, by removing the annoying MSVC warnings that, in Qt 5, so nicely pin-pointed all these implicit conversions as hard errors.

      There were several real bugs in e.g. the QBuffer code corresponding to int/qsizetype, so there's probably more.

      Acceptance criterium: every int has been inspected and, if needed, ported to qsizetype. Unfortunately, relying on compiler warnings isn't enough, as explicit casts won't raise warnings, but need to be ported nonetheless.

      The goal is not to just shut up compiler warnings. The goal has to be to enable a smooth qsizetype transition with no impedance mismatches between containers and the rest of Qt. This means that even public APIs are not exempt from being changed (examples that were fixed: QVersionNumber; QByteArrayList).


        Issue Links

          For Gerrit Dashboard: QTBUG-104825
          # Subject Branch Project Status CR V



              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              0 Vote for this issue
              2 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes