summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2018-09-13 15:16:19 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2018-09-14 08:30:07 +0000
commit6e4627b9513aae4b8b2e18f90e898951c3eb7810 (patch)
tree46ed8c40c53d75b5ad310b9c584d54ee3a7a735a
parentdadeb1bcb2bcbbf347a711a88b9e59d45c523df3 (diff)
Move strings variable from global to local scope
Change-Id: I8934a434c8d87cb72b28c80de5737a7dd0c073ef Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--src/plugins/platforms/webgl/qwebglcontext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/webgl/qwebglcontext.cpp b/src/plugins/platforms/webgl/qwebglcontext.cpp
index 409b093..0a011f2 100644
--- a/src/plugins/platforms/webgl/qwebglcontext.cpp
+++ b/src/plugins/platforms/webgl/qwebglcontext.cpp
@@ -173,8 +173,6 @@ inline int imageSize(GLsizei width, GLsizei height, GLenum format, GLenum type,
return rowSize * height;
}
-QByteArrayList strings;
-
static void lockMutex()
{
QWebGLIntegrationPrivate::instance()->webSocketServer->mutex()->lock();
@@ -851,6 +849,7 @@ QWEBGL_FUNCTION(getAttribLocation, GLint, glGetAttribLocation,
QWEBGL_FUNCTION(getString, const GLubyte *, glGetString,
(GLenum) name)
{
+ static QByteArrayList strings;
const auto it = currentContextData()->cachedParameters.find(name);
if (it != currentContextData()->cachedParameters.end()) {
auto &stringCache = currentContextData()->stringCache;