doc: Add default openGL typedefs for clangqdoc

When Q_CLANG_QDOC is defined, ensure that the following openGL
types are defined:
typedef int GLint;
typedef int GLsizei;
typedef unsigned int GLuint;
typedef unsigned int GLenum;
typedef unsigned int GLbitfield;
typedef float GLfloat;
typedef float GLclampf;
typedef bool GLboolean;
typedef void GLvoid;
typedef char GLchar;
Running clangqdoc with these on macOS fixed over 500 qdoc errors!

There were also some functions that declared the parameter list as void.
It was also shown as void in the \fn command for each function in the
.cpp file, which is wrong. When the function is declared in the header
as int func(void), it should just be \fn int classname::func() in the
.cpp file.

Change-Id: I6489d499f0830e5ba97c085ed5dadfad5affecb7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
bb10
Martin Smith 2017-02-16 10:09:40 +01:00
parent 1a78e16d19
commit f1817ea9ce
2 changed files with 26 additions and 3 deletions

View File

@ -2584,7 +2584,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
*/
/*!
\fn void QOpenGLExtraFunctions::glEndTransformFeedback(void)
\fn void QOpenGLExtraFunctions::glEndTransformFeedback()
Convenience function that calls glEndTransformFeedback().
@ -3091,7 +3091,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
*/
/*!
\fn void QOpenGLExtraFunctions::glPauseTransformFeedback(void)
\fn void QOpenGLExtraFunctions::glPauseTransformFeedback()
Convenience function that calls glPauseTransformFeedback().
@ -3156,7 +3156,7 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctionsPrivate, QT_OPENGL_FUNCTIONS)
*/
/*!
\fn void QOpenGLExtraFunctions::glResumeTransformFeedback(void)
\fn void QOpenGLExtraFunctions::glResumeTransformFeedback()
Convenience function that calls glResumeTransformFeedback().

View File

@ -227,6 +227,29 @@ struct QOpenGLFunctionsPrivate;
#undef glTexLevelParameteriv
#if defined(Q_CLANG_QDOC)
#undef GLint
typedef int GLint;
#undef GLsizei
typedef int GLsizei;
#undef GLuint
typedef unsigned int GLuint;
#undef GLenum
typedef unsigned int GLenum;
#undef GLbitfield
typedef unsigned int GLbitfield;
#undef GLfloat
typedef float GLfloat;
#undef GLclampf
typedef float GLclampf;
#undef GLboolean
typedef bool GLboolean;
#undef GLvoid
typedef void GLvoid;
#undef GLchar
typedef char GLchar;
#endif
class Q_GUI_EXPORT QOpenGLFunctions
{
public: