summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/include/harfbuzz/hb-ot-tag.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-05-02 11:19:35 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-05-24 04:38:21 +0000
commit00769990310ea2d5e89e56fcc1078c174a24d82d (patch)
tree4daa9c1d287d0259c7c326eff5b942849bd021fb /src/3rdparty/harfbuzz-ng/include/harfbuzz/hb-ot-tag.h
parentf22e9795d9a32fc4e9f4d6f2a70c2f831028342b (diff)
QRegion: re-add rects() and port setRects() to QSpanHEADdev
In Qt 5, we had QVector<QRect> QRegion::rects(), but it was deprecated, because just iterating over the QRegion as a container of QRects was more efficient (QRegion has a SSO for the case of one rectangle). With QSpan, we can now bring it back with the same efficiency as iteration, supporting Qt 5 code that never made the move away from rects() and new code that wishes to make the conversion into rectangles more explicit. Re-add the Qt 5 tests, which show that the function is nearly a drop-in replacement for the Qt 5 rects() (QSpan, at the time of this commit, doesn't have relational operators, yet). Also add a QSpan overload of setRects(). The old (ptr, n) function (now obsoleted, but not deprecated) allowed nullptr + n != 0, which QSpan doesn't accept, so print a warning in that case. Also, QSpan can hold more than INT_MAX elements on 64-bit platforms, but QRegion's API was never ported from int to qsizetype, so we need to catch oversized spans used as inputs, too. [ChangeLog][QtGui][QRegion] Added QSpan overload of setRects(); re-added Qt5's rects(), but returning QSpan instead of QVector now. Fixes: QTBUG-124712 Change-Id: I24570c886cbf77abd8d1f4a3f42ae53c892cd9ff Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/include/harfbuzz/hb-ot-tag.h')
0 files changed, 0 insertions, 0 deletions