summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengldebug.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-02-09 12:05:17 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-02-11 19:25:38 +0000
commit3ff5251740f4c4cca74177cc977ebe7df6e7f92b (patch)
tree8df5ae3122f6c8595af393c105aec6730fca40a0 /src/gui/opengl/qopengldebug.cpp
parent2523f62939948f383178054c2d061711c0413348 (diff)
QtGui: eradicate Q_FOREACH loops [QVarLengthArray]
Q_FOREACH over a QVarLengthArray is a partcularly bad idea. Use C++11 range-for (without qAsConst(), because QVLA isn't CoW). Change-Id: I5ee55557577f183151d3871e4518382c4adf0237 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopengldebug.cpp')
-rw-r--r--src/gui/opengl/qopengldebug.cpp6
1 files changed, 3 insertions, 3 deletions
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));
}