kwin : replace Q_FOREACH with for(a:b)

replace Q_FOREACH loops with newer for (a:b) notation

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>

REVIEW: 114222
icc-effect-5.14.5
Laurent Navet 2013-11-30 14:24:36 +01:00 committed by Martin Gräßlin
parent 4f1c1c2c83
commit 88fc43beeb
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -1467,7 +1467,7 @@ void SceneOpenGL2Window::performPaint(int mask, QRegion region, WindowPaintData
OpenGLWindowPixmap *previous = previousWindowPixmap<OpenGLWindowPixmap>();
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.