diff options
-rw-r--r-- | .qmake.conf | 5 | ||||
-rw-r--r-- | src/plugins/platforms/webgl/qwebglcontext.cpp | 5 | ||||
-rw-r--r-- | src/plugins/platforms/webgl/qwebglintegration.cpp | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/.qmake.conf b/.qmake.conf index 1ed62c5..84d43f6 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,6 @@ load(qt_build_config) -MODULE_VERSION = 5.13.1 +DEFINES += QT_NO_JAVA_STYLE_ITERATORS +DEFINES += QT_NO_FOREACH + +MODULE_VERSION = 5.14.0 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); diff --git a/src/plugins/platforms/webgl/qwebglintegration.cpp b/src/plugins/platforms/webgl/qwebglintegration.cpp index 58e4be0..dfae866 100644 --- a/src/plugins/platforms/webgl/qwebglintegration.cpp +++ b/src/plugins/platforms/webgl/qwebglintegration.cpp @@ -136,7 +136,8 @@ void QWebGLIntegration::initialize() void QWebGLIntegration::destroy() { Q_D(QWebGLIntegration); - foreach (QWindow *w, qGuiApp->topLevelWindows()) + const auto tlws = qGuiApp->topLevelWindows(); + for (QWindow *w : tlws) w->destroy(); QWindowSystemInterface::handleScreenRemoved(d->screen); |