diff options
Diffstat (limited to 'src/gui/opengl')
-rw-r--r-- | src/gui/opengl/qopengl.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 4 | ||||
-rw-r--r-- | src/gui/opengl/qopenglshaderprogram.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index eadca7cedf..35b1ec3bcf 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -548,7 +548,7 @@ Q_GUI_EXPORT std::set<QByteArray> *qgpu_features(const QString &filename) { const QSet<QString> features = QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu::fromContext(), filename); std::set<QByteArray> *result = new std::set<QByteArray>; - foreach (const QString &feature, features) + for (const QString &feature : features) result->insert(feature.toUtf8()); return result; } diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index e35db51e01..c1b2e10785 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1156,7 +1156,7 @@ QVector<GLuint> QOpenGLFramebufferObject::textures() const if (d->format.samples() != 0) return ids; ids.reserve(d->colorAttachments.count()); - foreach (const QOpenGLFramebufferObjectPrivate::ColorAttachment &color, d->colorAttachments) + for (const auto &color : d->colorAttachments) ids.append(color.guard ? color.guard->id() : 0); return ids; } @@ -1240,7 +1240,7 @@ QVector<QSize> QOpenGLFramebufferObject::sizes() const Q_D(const QOpenGLFramebufferObject); QVector<QSize> sz; sz.reserve(d->colorAttachments.size()); - foreach (const QOpenGLFramebufferObjectPrivate::ColorAttachment &color, d->colorAttachments) + for (const auto &color : d->colorAttachments) sz.append(color.size); return sz; } diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index afdb1133ea..1e0abbfab9 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -728,7 +728,7 @@ QOpenGLShaderProgramPrivate::~QOpenGLShaderProgramPrivate() bool QOpenGLShaderProgramPrivate::hasShader(QOpenGLShader::ShaderType type) const { - foreach (QOpenGLShader *shader, shaders) { + for (QOpenGLShader *shader : shaders) { if (shader->shaderType() == type) return true; } |