diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -798,7 +798,8 @@ // movie aspect - two times ;-) It's a Fox format, though, so maybe we want to restrict // to 2.20:1 - Panavision - which has actually been used for interesting movies ...) // would be 57% of 5/4 - foreach (const QRect &r, region.rects()) { + for (auto it = region.cbegin(), end = region.cend(); it != end; ++it) { + const QRect &r = *it; // damagedPixels += r.width() * r.height(); // combined window damage test damagedPixels = r.width() * r.height(); // experimental single window damage testing if (damagedPixels > fullRepaintLimit) { @@ -1178,8 +1179,8 @@ const QRegion filterRegion = region.translated(-x(), -y()); // split all quads in bounding rect with the actual rects in the region foreach (const WindowQuad &quad, data.quads) { - foreach (const QRect &r, filterRegion.rects()) { - const QRectF rf(r); + for (auto it = filterRegion.cbegin(), end = filterRegion.cend(); it != end; ++it) { + const QRectF rf(*it); const QRectF quadRect(QPointF(quad.left(), quad.top()), QPointF(quad.right(), quad.bottom())); const QRectF &intersected = rf.intersected(quadRect); if (intersected.isValid()) {