summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-06-29 14:33:45 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-01 11:46:47 +0200
commit9e1ba742d3ffdaa4906b2aa1a031ee01a9f31a96 (patch)
treef2fdf006386bc2ba2bb5056ab7218bd259a0900c /src
parent9be2dd636638620c82a48e72e92efccb5ed7e673 (diff)
Eradicate Java-style iterators and mark the module free of them
Java-style iterators are scheduled for deprecation, or at the very least banned from use in Qt's own implementation. Change-Id: I3b65526968551baf48d1acb1e7184a3800092b56 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/webgl/qwebglcontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/platforms/webgl/qwebglcontext.cpp b/src/plugins/platforms/webgl/qwebglcontext.cpp
index 6bac008..c1ee009 100644
--- a/src/plugins/platforms/webgl/qwebglcontext.cpp
+++ b/src/plugins/platforms/webgl/qwebglcontext.cpp
@@ -228,9 +228,8 @@ static int bufferSize(GLsizei count, GLint elemsPerVertex, GLenum type, GLsizei
static void setVertexAttribs(QWebGLFunctionCall *event, GLsizei count)
{
event->addInt(currentContextData()->vertexAttribPointers.count());
- QHashIterator<GLuint, ContextData::VertexAttrib> it(currentContextData()->vertexAttribPointers);
- while (it.hasNext()) {
- it.next();
+ const auto &vertexAttribPointers = currentContextData()->vertexAttribPointers;
+ for (auto it = vertexAttribPointers.cbegin(), end = vertexAttribPointers.cend(); it != end; ++it) {
const ContextData::VertexAttrib &va(it.value());
if (va.arrayBufferBinding == 0 && va.enabled) {
int len = bufferSize(count, va.size, va.type, va.stride);