Port away from QRegion::rects()
Use begin()/end() instead. Change-Id: I1a73b4518ee7408271ec913a219c034e330b0d5a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
e96d16d2b0
commit
a8a2dc0d8a
@ -97,7 +97,7 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
|
||||
{
|
||||
struct ::wl_region *region = mCompositor.create_region();
|
||||
|
||||
Q_FOREACH (const QRect &rect, qregion.rects())
|
||||
for (const QRect &rect : qregion)
|
||||
wl_region_add(region, rect.x(), rect.y(), rect.width(), rect.height());
|
||||
|
||||
return region;
|
||||
|
@ -595,8 +595,7 @@ void QWaylandWindow::commit(QWaylandBuffer *buffer, const QRegion &damage)
|
||||
return;
|
||||
|
||||
attachOffset(buffer);
|
||||
const QVector<QRect> rects = damage.rects();
|
||||
for (const QRect &rect: rects)
|
||||
for (const QRect &rect: damage)
|
||||
wl_surface::damage(rect.x(), rect.y(), rect.width(), rect.height());
|
||||
wl_surface::commit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user