From c3b7a0291d618b3dec0293da283277aa0fdd8a72 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Wed, 12 Oct 2011 13:52:04 +0200 Subject: Use a QFunctionPointer for getProcAddress() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qdoc does not understand the void (*) syntax, there is a typedef to QFunctionPointer that does work. Change-Id: Idbe9d43d00f8676304d088d72795b6ddb7e4ee72 Reviewed-by: Samuel Rødal --- src/gui/kernel/qplatformopenglcontext_qpa.cpp | 11 ++--------- src/gui/kernel/qplatformopenglcontext_qpa.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qplatformopenglcontext_qpa.cpp b/src/gui/kernel/qplatformopenglcontext_qpa.cpp index 3b2ce2465b..e764419825 100644 --- a/src/gui/kernel/qplatformopenglcontext_qpa.cpp +++ b/src/gui/kernel/qplatformopenglcontext_qpa.cpp @@ -65,25 +65,18 @@ QT_BEGIN_NAMESPACE which maps to the QPlatformOpenGLContext. */ -/*! \fn void QPlatformOpenGLContext::swapBuffers() +/*! \fn void QPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface) Reimplement in subclass to native swap buffers calls The implementation must support being called in a thread different than the gui-thread. */ -/*! \fn void *QPlatformOpenGLContext::getProcAddress(const QString &procName) +/*! \fn QFunctionPointer QPlatformOpenGLContext::getProcAddress(const QByteArray &procName) Reimplement in subclass to native getProcAddr calls. Note: its convenient to use qPrintable(const QString &str) to get the const char * pointer */ -/*! \fn QPlatformWindowFormat QPlatformOpenGLContext::platformWindowFormat() const - QWidget has the function qplatformWindowFormat(). That function is for the application - programmer to request the format of the window and the context that he wants. - - Reimplement this function in a subclass to indicate what format the glContext actually has. -*/ - class QPlatformOpenGLContextPrivate { public: diff --git a/src/gui/kernel/qplatformopenglcontext_qpa.h b/src/gui/kernel/qplatformopenglcontext_qpa.h index 6fb8da25c1..fc1b404b91 100644 --- a/src/gui/kernel/qplatformopenglcontext_qpa.h +++ b/src/gui/kernel/qplatformopenglcontext_qpa.h @@ -68,7 +68,7 @@ public: virtual bool makeCurrent(QPlatformSurface *surface) = 0; virtual void doneCurrent() = 0; - virtual void (*getProcAddress(const QByteArray &procName)) () = 0; + virtual QFunctionPointer getProcAddress(const QByteArray &procName) = 0; QOpenGLContext *context() const; -- cgit v1.2.3