summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-01-16 10:01:01 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-16 11:47:32 +0100
commit9702400e2d45c074922e488e01ab8ade82431b47 (patch)
tree6224e50ced20792f7867dfafb0cae03b9c2eb018
parent5b1aa4c75de4301d1417fd98bb1abf0767779736 (diff)
Fixed QGLContext::getProcAddress() to return a function pointer.
Task-number: QTBUG-5729 Change-Id: I57e71f89a2c5ca7f74f73c66adcbf4a6cc073813 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/opengl/qgl.h2
-rw-r--r--src/opengl/qgl_qpa.cpp4
-rw-r--r--src/opengl/qglextensions.cpp6
4 files changed, 6 insertions, 8 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 0ef2a0b0de..7afbaa9343 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3582,7 +3582,7 @@ QGLWidget::~QGLWidget()
*/
/*!
- \fn void *QGLContext::getProcAddress(const QString &proc) const
+ \fn QFunctionPointer QGLContext::getProcAddress() const
Returns a function pointer to the GL extension function passed in
\a proc. 0 is returned if a pointer to the function could not be
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 3af7411ae5..85c4eb9dbc 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -322,7 +322,7 @@ public:
static void setTextureCacheLimit(int size);
static int textureCacheLimit();
- void *getProcAddress(const QString &proc) const;
+ QFunctionPointer getProcAddress(const QString &proc) const;
QPaintDevice* device() const;
QColor overlayTransparentColor() const;
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index ae46fc99c6..009b43d297 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -231,10 +231,10 @@ void QGLContext::swapBuffers() const
d->guiGlContext->swapBuffers(widget->windowHandle());
}
-void *QGLContext::getProcAddress(const QString &procName) const
+QFunctionPointer QGLContext::getProcAddress(const QString &procName) const
{
Q_D(const QGLContext);
- return (void *)d->guiGlContext->getProcAddress(procName.toAscii());
+ return d->guiGlContext->getProcAddress(procName.toAscii());
}
void QGLWidget::setContext(QGLContext *context,
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp
index 906fd4d9a1..34196b6181 100644
--- a/src/opengl/qglextensions.cpp
+++ b/src/opengl/qglextensions.cpp
@@ -43,13 +43,11 @@
QT_BEGIN_NAMESPACE
-static void *qt_gl_getProcAddress_search
+static QFunctionPointer qt_gl_getProcAddress_search
(QGLContext *ctx, const char *name1, const char *name2,
const char *name3, const char *name4)
{
- void *addr;
-
- addr = ctx->getProcAddress(QLatin1String(name1));
+ QFunctionPointer addr = ctx->getProcAddress(QLatin1String(name1));
if (addr)
return addr;