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

Add QRegion::rects() returning QSpan<const QRect>

    XMLWordPrintable

Details

    Description

      QRegion used to have a QVector<QRect> rects(), which was removed for Qt 6.0, because since Qt 5.4 or so QRegion itself is iterable, so it's kinda useless. But this gives us the opportunity to use the vacant name rects() to return a QSpan<const QRect> instead. This has two benefits: a) Qt 5 code needs to be changed in fewer places and b) region.rects() is slightly more readable than iterating over the region itself.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes