summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2017-02-16 10:09:40 +0100
committerMartin Smith <martin.smith@qt.io>2017-12-02 17:29:59 +0000
commitf1817ea9ce9260824c542554564d642c1b8a6599 (patch)
tree53133f08f90f1acfff694e8af3333369188eb6f9 /src/gui/opengl/qopenglfunctions.h
parent1a78e16d194dbedcb822985e946a6b1ed5df2b6e (diff)
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>
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.h')
-rw-r--r--src/gui/opengl/qopenglfunctions.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 273ceaddc0..72af128219 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -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: