summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-08-18 21:09:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-08-19 00:42:00 +0200
commit75b62f3a172c277e8b90ef536da354deccb54d24 (patch)
tree2312151dfcaf678dc738062c3b85b32b67b51c44 /src/gui/kernel
parent65240c602b2238f090118af816a2b051da7cf032 (diff)
parentca524e5b70ccfeb6386cf0c5df83ffb86a8771fe (diff)
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp4
-rw-r--r--src/gui/kernel/qopenglcontext_p.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 71a1d1e074..6b2bb092b1 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -639,6 +639,7 @@ bool QOpenGLContext::create()
*/
void QOpenGLContext::destroy()
{
+ deleteQGLContext();
Q_D(QOpenGLContext);
if (d->platformGLContext)
emit aboutToBeDestroyed();
@@ -1086,6 +1087,9 @@ void *QOpenGLContext::qGLContextHandle() const
}
/*!
+ internal: If the delete function is specified QOpenGLContext "owns"
+ the passed context handle and will use the delete function to destroy it.
+
\internal
*/
void QOpenGLContext::setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *))
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 46e1572376..2d27b19ebe 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -198,6 +198,7 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
public:
QOpenGLContextPrivate()
: qGLContextHandle(0)
+ , qGLContextDeleteFunction(0)
, platformGLContext(0)
, shareContext(0)
, shareGroup(0)