summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-07-20 11:02:31 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-25 00:48:38 +0200
commit15f041e6d580b518b317a40c8420e754b5e95ff8 (patch)
treed6452a9bfb1b5798198977d730013b0b519c6b9a /src/opengl/qgl_p.h
parentb3694d12959900270b3aea2af594df379f1db092 (diff)
QtOpenGL: use nullary version of qRegisterMetaType<T>("T")
Using the nullary version has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. For this, it requires Q_DECLARE_METATYPE(T), so add, too. Change-Id: Ic9a9013aa13ff9d8f917f9df033dd2197944f84a Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index b0a430551f..c2b16f91e0 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -377,12 +377,16 @@ private:
QGLContext *m_ctx;
};
+QT_END_NAMESPACE
+Q_DECLARE_METATYPE(GLuint)
+QT_BEGIN_NAMESPACE
+
class Q_OPENGL_EXPORT QGLTextureDestroyer : public QObject
{
Q_OBJECT
public:
QGLTextureDestroyer() : QObject() {
- qRegisterMetaType<GLuint>("GLuint");
+ qRegisterMetaType<GLuint>();
connect(this, SIGNAL(freeTexture(QGLContext *, QPlatformPixmap *, GLuint)),
this, SLOT(freeTexture_slot(QGLContext *, QPlatformPixmap *, GLuint)));
}