summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index ca5c732e93..cd7a7f0d01 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1484,8 +1484,8 @@ Q_OPENGL_EXPORT QGLShareRegister* qgl_share_reg()
*/
QGLContext::QGLContext(const QGLFormat &format, QPaintDevice *device)
+ : d_ptr(new QGLContextPrivate(this))
{
- d_ptr = new QGLContextPrivate(this);
Q_D(QGLContext);
d->init(device, format);
}
@@ -1507,8 +1507,8 @@ QGLContext::QGLContext(const QGLFormat &format, QPaintDevice *device)
\sa format(), isValid()
*/
QGLContext::QGLContext(const QGLFormat &format)
+ : d_ptr(new QGLContextPrivate(this))
{
- d_ptr = new QGLContextPrivate(this);
Q_D(QGLContext);
d->init(0, format);
}
@@ -1539,7 +1539,6 @@ QGLContext::~QGLContext()
QGLSignalProxy::instance()->emitAboutToDestroyContext(this);
reset();
- delete d;
}
void QGLContextPrivate::cleanup()