summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexture.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-12-12 12:58:11 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-01-20 15:03:15 +0100
commit06bb315beb6c2c398223cfe52cbc7f66e14a8557 (patch)
tree5224974a8d2cfa34780809ed87be82a7f544827e /src/gui/opengl/qopengltexture.cpp
parent35a461d0261af4178e560df3e3c8fd6fd19bdeb5 (diff)
Remove QOpenGLTextureHelper dependency from QOpenGLContext
It's now just a pointer to a forward declared class Task-number: QTBUG-74409 Change-Id: I34df385154dcff2bbba2f6318825ab5258fa6695 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/opengl/qopengltexture.cpp')
-rw-r--r--src/gui/opengl/qopengltexture.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index fd282e3ba0..35d90898e5 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -151,7 +151,8 @@ void QOpenGLTexturePrivate::initializeOpenGLFunctions()
texFuncs = context->textureFunctions();
if (!texFuncs) {
texFuncs = new QOpenGLTextureHelper(context);
- context->setTextureFunctions(texFuncs);
+ auto *funcs = texFuncs; // lets us capture by pointer value below
+ context->setTextureFunctions(funcs, [funcs] { delete funcs; });
}
}