Screenshot effect: Convert a couple foreach loops
This commit is contained in:
parent
fb118a9343
commit
571ca776c3
1 changed files with 2 additions and 2 deletions
|
@ -241,7 +241,7 @@ void ScreenShotEffect::postPaintScreen()
|
||||||
double right = m_scheduledScreenshot->width();
|
double right = m_scheduledScreenshot->width();
|
||||||
double bottom = m_scheduledScreenshot->height();
|
double bottom = m_scheduledScreenshot->height();
|
||||||
if (m_scheduledScreenshot->hasDecoration() && m_type & INCLUDE_DECORATION) {
|
if (m_scheduledScreenshot->hasDecoration() && m_type & INCLUDE_DECORATION) {
|
||||||
foreach (const WindowQuad & quad, d.quads) {
|
for (const WindowQuad &quad : qAsConst(d.quads)) {
|
||||||
// we need this loop to include the decoration padding
|
// we need this loop to include the decoration padding
|
||||||
left = qMin(left, quad.left());
|
left = qMin(left, quad.left());
|
||||||
top = qMin(top, quad.top());
|
top = qMin(top, quad.top());
|
||||||
|
@ -254,7 +254,7 @@ void ScreenShotEffect::postPaintScreen()
|
||||||
top = m_scheduledScreenshot->height();
|
top = m_scheduledScreenshot->height();
|
||||||
right = 0;
|
right = 0;
|
||||||
bottom = 0;
|
bottom = 0;
|
||||||
foreach (const WindowQuad & quad, d.quads) {
|
for (const WindowQuad &quad : qAsConst(d.quads)) {
|
||||||
if (quad.type() == WindowQuadContents) {
|
if (quad.type() == WindowQuadContents) {
|
||||||
newQuads << quad;
|
newQuads << quad;
|
||||||
left = qMin(left, quad.left());
|
left = qMin(left, quad.left());
|
||||||
|
|
Loading…
Reference in a new issue