From e5ee6c00946d3a13502e460b7ca8354aa35586a9 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 3 Sep 2013 14:38:45 +0200 Subject: Doc: Link to external docs in QOpenGLFunctions_* classes These are wrapper classes that do not document their functions. This change adds links to docs on opengl.org / khronos.org where suitable, and changes the \brief commands to mention the correct OpenGL version/profile. Change-Id: I48154d5bce26f6753ca4400962939847c78a527d Reviewed-by: Jerome Pasion Reviewed-by: Sean Harmer --- util/glgen/codegenerator.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'util/glgen') diff --git a/util/glgen/codegenerator.cpp b/util/glgen/codegenerator.cpp index c6a77569dc..693e33cf67 100644 --- a/util/glgen/codegenerator.cpp +++ b/util/glgen/codegenerator.cpp @@ -593,8 +593,27 @@ void CodeGenerator::writePublicClassImplementation(const QString &baseFileName, << QStringLiteral(" \\class ") << className << endl << QStringLiteral(" \\inmodule QtGui") << endl << QStringLiteral(" \\since 5.1") << endl + << QStringLiteral(" \\wrapper") << endl << QStringLiteral(" \\brief The ") << className - << QStringLiteral(" class provides all functions for this version and profile of OpenGL.") << endl << endl + << QString(QStringLiteral(" class provides all functions for OpenGL %1.%2 ")) + .arg(versionProfile.version.major) + .arg(versionProfile.version.minor); + + if (!profileSuffix.isEmpty()) { + profileSuffix.remove(0, 1); + profileSuffix.append(QStringLiteral(" profile")); + } else { + profileSuffix = "specification"; + } + + stream << profileSuffix << QStringLiteral(".") << endl << endl + << QStringLiteral(" This class is a wrapper for functions from ") + << QString(QStringLiteral("OpenGL %1.%2 ")) + .arg(versionProfile.version.major) + .arg(versionProfile.version.minor) + << profileSuffix << QStringLiteral(".") << endl + << QStringLiteral(" See reference pages on \\l {http://www.opengl.org/sdk/docs/}{opengl.org}") << endl + << QStringLiteral(" for function documentation.") << endl << endl << QStringLiteral(" \\sa QAbstractOpenGLFunctions") << endl << QStringLiteral("*/") << endl << endl; -- cgit v1.2.3