From 571ca776c364127a5c50ffe5032c2f05eb8e6ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Wed, 19 Aug 2020 14:56:19 +0200 Subject: [PATCH] Screenshot effect: Convert a couple foreach loops --- effects/screenshot/screenshot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/screenshot/screenshot.cpp b/effects/screenshot/screenshot.cpp index 4f19442160..611dc416b7 100644 --- a/effects/screenshot/screenshot.cpp +++ b/effects/screenshot/screenshot.cpp @@ -241,7 +241,7 @@ void ScreenShotEffect::postPaintScreen() double right = m_scheduledScreenshot->width(); double bottom = m_scheduledScreenshot->height(); 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 left = qMin(left, quad.left()); top = qMin(top, quad.top()); @@ -254,7 +254,7 @@ void ScreenShotEffect::postPaintScreen() top = m_scheduledScreenshot->height(); right = 0; bottom = 0; - foreach (const WindowQuad & quad, d.quads) { + for (const WindowQuad &quad : qAsConst(d.quads)) { if (quad.type() == WindowQuadContents) { newQuads << quad; left = qMin(left, quad.left());