summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-04-30 11:17:14 (GMT)
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-07-02 10:25:16 (GMT)
commitdecda7ea196b610ab1d70345cb89a4a67bfd1e91 (patch)
tree67ab99009e09dae6651ca5182562fbcd2cd401f6 /src/opengl/qgl_p.h
parent6451874792f515e5e30597e815a21a3a6cc325bb (diff)
downloadQt-decda7ea196b610ab1d70345cb89a4a67bfd1e91.zip
Qt-decda7ea196b610ab1d70345cb89a4a67bfd1e91.tar.gz
Qt-decda7ea196b610ab1d70345cb89a4a67bfd1e91.tar.bz2
Unnecessary alloc + remove unused headers.
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 9b1856e..acd799a 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -471,8 +471,6 @@ private:
QGLContext *m_ctx;
};
-#include <qdebug.h>
-#include <qthread.h>
class QGLTexture {
public:
QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D,
@@ -724,11 +722,9 @@ class QGLEngineThreadStorage
{
public:
QPaintEngine *engine() {
- QPaintEngine *localEngine = storage.localData();
- if (!localEngine) {
+ QPaintEngine *&localEngine = storage.localData();
+ if (!localEngine)
localEngine = new T;
- storage.setLocalData(localEngine);
- }
return localEngine;
}