diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp index 092025c224..0132dc03bb 100644 --- a/src/gui/opengl/qopengldebug.cpp +++ b/src/gui/opengl/qopengldebug.cpp @@ -1276,9 +1276,9 @@ void QOpenGLDebugLoggerPrivate::controlDebugMessages(QOpenGLDebugMessage::Source // Unfortunately, some bugged drivers do NOT ignore it, so pass NULL in case. const GLuint * const idPtr = idCount ? ids.constData() : 0; - foreach (GLenum source, glSources) - foreach (GLenum type, glTypes) - foreach (GLenum severity, glSeverities) + for (GLenum source : glSources) + for (GLenum type : glTypes) + for (GLenum severity : glSeverities) glDebugMessageControl(source, type, severity, idCount, idPtr, GLboolean(enable)); } diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index a1df41e89f..81df8027a1 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -3040,7 +3040,7 @@ void QTextEngine::resolveFormats() const format = collection->charFormat(formatIndex(si)); } if (!currentFormats.isEmpty()) { - foreach (int cur, currentFormats) { + for (int cur : currentFormats) { const QTextLayout::FormatRange &range = specialData->formats.at(cur); Q_ASSERT(range.start <= si->position && range.start + range.length >= end); format.merge(range.format);