summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2023-10-13 13:15:10 +0200
committerLuca Di Sera <luca.disera@qt.io>2023-10-13 18:00:37 +0200
commit6e7f7f6f48e35e09de415bbdeef87d55fefa81ec (patch)
tree7857eecb4597180cc36f255d77f2614403d1ce1d /src/gui/painting
parent2dce4995619bafeeb2f7ed0fc75749000ed652b7 (diff)
Doc: Add missing return type to QRgbaFloat::fromRgba*
When QDoc reads an `\fn` command it saves it to a file to parse it with Clang, with the objective of using the produced AST to perform certain sanity checks on the documented element. Generally, `\fn` commands that do not represent correct C++ code are accepted as long as Clang is still able to build an AST Node that QDoc can work with, not resulting in any issue in the output documentation. For example, an `\fn` that doesn't state a return type might be able to be parsed correctly enough by Clang to produce a sensible Node for the function that QDoc is interested into. The documentation for the various `QRgbaFloat::fromRgba*` make use of this possibility by not stating a return type. Up to Clang 15 this was not an issue, and a correct-enough AST was produced when the `\fn` commands for those methods were parsed. On Clang 16, Clang chokes on the missing return type, being unable to recognize the function definition and produce an AST that QDoc can work with. This has the effect of losing those documented element in the output documentation. To avoid the issue, a return type is now added to the relevant `\fn` commands. Task-number: QTBUG-111580 Change-Id: Id9d8a713caf7d6cbb4d2de1040ce5ea5092f7b14 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qrgbafloat.qdoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qrgbafloat.qdoc b/src/gui/painting/qrgbafloat.qdoc
index 718cd31016..14a64029d6 100644
--- a/src/gui/painting/qrgbafloat.qdoc
+++ b/src/gui/painting/qrgbafloat.qdoc
@@ -33,7 +33,7 @@
*/
/*!
- \fn template<typename F> QRgbaFloat<F>::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
+ \fn template<typename F> QRgbaFloat QRgbaFloat<F>::fromRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
Constructs a QRgbaFloat value from the four 16-bit integer color channels \a red, \a green, \a blue and \a alpha.
@@ -41,7 +41,7 @@
*/
/*!
- \fn template<typename F> QRgbaFloat<F>::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
+ \fn template<typename F> QRgbaFloat QRgbaFloat<F>::fromRgba(quint8 red, quint8 green, quint8 blue, quint8 alpha)
Constructs a QRgbaFloat value from the four 8-bit color channels \a red, \a green, \a blue and \a alpha.
@@ -49,7 +49,7 @@
*/
/*!
- \fn template<typename F> QRgbaFloat<F>::fromArgb32(uint rgb)
+ \fn template<typename F> QRgbaFloat QRgbaFloat<F>::fromArgb32(uint rgb)
Constructs a QRgbaFloat value from the 32bit ARGB value \a rgb.