From 88fc43beebce592f91a7410a88952763011259fe Mon Sep 17 00:00:00 2001 From: Laurent Navet Date: Sat, 30 Nov 2013 14:24:36 +0100 Subject: [PATCH] kwin : replace Q_FOREACH with for(a:b) replace Q_FOREACH loops with newer for (a:b) notation Signed-off-by: Laurent Navet REVIEW: 114222 --- data/update_kwin_411.cpp | 2 +- kcmkwin/kwindecoration/decorationmodel.cpp | 2 +- scene_opengl.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/update_kwin_411.cpp b/data/update_kwin_411.cpp index d81848d24f..20c25a488e 100644 --- a/data/update_kwin_411.cpp +++ b/data/update_kwin_411.cpp @@ -40,7 +40,7 @@ bool migrateRulesShortcut() return false; } bool updated = false; - Q_FOREACH (const QString &groupName, config.groupList()) { + for (const QString &groupName : config.groupList()) { KConfigGroup group = config.group(groupName); if (!group.hasKey(KEY)) { continue; diff --git a/kcmkwin/kwindecoration/decorationmodel.cpp b/kcmkwin/kwindecoration/decorationmodel.cpp index f9bb6adb12..7030642e69 100644 --- a/kcmkwin/kwindecoration/decorationmodel.cpp +++ b/kcmkwin/kwindecoration/decorationmodel.cpp @@ -156,7 +156,7 @@ void DecorationModel::findAuroraeThemes() QStringList themes; const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "aurorae/themes/", QStandardPaths::LocateDirectory); QStringList themeDirectories; - Q_FOREACH (const QString & dir, dirs) { + for (const QString & dir : dirs) { QDir directory = QDir(dir); for (const QString &themeDir : directory.entryList(QDir::AllDirs | QDir::NoDotAndDotDot)) { themeDirectories << dir + themeDir; diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 9d4f2c50cb..5474325ff5 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -1467,7 +1467,7 @@ void SceneOpenGL2Window::performPaint(int mask, QRegion region, WindowPaintData OpenGLWindowPixmap *previous = previousWindowPixmap(); if (previous) { const QRect &oldGeometry = previous->contentsRect(); - Q_FOREACH (const WindowQuad &quad, quads[ContentLeaf]) { + for (const WindowQuad &quad : quads[ContentLeaf]) { // we need to create new window quads with normalize texture coordinates // normal quads divide the x/y position by width/height. This would not work as the texture // is larger than the visible content in case of a decorated Client resulting in garbage being shown. @@ -1648,7 +1648,7 @@ void SceneOpenGL1Window::performPaint(int mask, QRegion region, WindowPaintData previous->texture()->setFilter(filter == Scene::ImageFilterGood ? GL_LINEAR : GL_NEAREST); WindowQuadList oldContents; const QRect &oldGeometry = previous->contentsRect(); - Q_FOREACH (const WindowQuad &quad, contentQuads) { + for (const WindowQuad &quad : contentQuads) { // we need to create new window quads with normalize texture coordinates // normal quads divide the x/y position by width/height. This would not work as the texture // is larger than the visible content in case of a decorated Client resulting in garbage being shown.