summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-03-10 18:37:33 +0100
committerTopi Reiniƶ <topi.reinio@qt.io>2020-03-10 17:51:56 +0000
commit52de905d0ec6159d3a1e7ad63fed018b5c6973d2 (patch)
treec19b57daae64c36c51119b0b104c47105bf9561b
parent67edae9a0837d8efeb105406e546ae3791e1204d (diff)
Doc: Fix documentation for class qfloat16
This class has documented member functions, but only the related \headerfile was documented. The class documentation itself was omitted with the \dontdocument command. Replace the \headerfile with a \class command, and move the global functions to be related to the class itself. Keep the title as a \keyword to avoid breaking any external links. The new class page will inherit the .html file name of the header page, so we're safe in that regard as well. Fixes: QTBUG-82800 Change-Id: Id51539b45e0642d91b304a37f95461ca3d6c9841 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/corelib/doc/src/dontdocument.qdoc2
-rw-r--r--src/corelib/global/qfloat16.cpp44
2 files changed, 24 insertions, 22 deletions
diff --git a/src/corelib/doc/src/dontdocument.qdoc b/src/corelib/doc/src/dontdocument.qdoc
index ff0aa98709..01bed99a57 100644
--- a/src/corelib/doc/src/dontdocument.qdoc
+++ b/src/corelib/doc/src/dontdocument.qdoc
@@ -34,7 +34,7 @@
QMetaTypeId2 QObjectData QObjectUserData QMapNodeBase QMapNode QMapDataBase
QMapData QHashData QHashNode QArrayDataPointer QTextStreamManipulator
QContiguousCacheData QContiguousCacheTypedData QNoDebug QUrlTwoFlags
- QCborValueRef qfloat16 QDeferredDeleteEvent QSpecialInteger QLittleEndianStorageType
+ QCborValueRef QDeferredDeleteEvent QSpecialInteger QLittleEndianStorageType
QBigEndianStorageType QFactoryInterface QFutureWatcherBase QJsonValuePtr
QJsonValueRefPtr QLinkedListNode QAbstractConcatenable QStringBuilderCommon
QTextCodec::ConverterState QThreadStorageData QTextStreamManipulator)
diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
index 3d82bbe95a..1f06b10313 100644
--- a/src/corelib/global/qfloat16.cpp
+++ b/src/corelib/global/qfloat16.cpp
@@ -45,18 +45,20 @@
QT_BEGIN_NAMESPACE
/*!
- \headerfile <QFloat16>
- \title 16-bit Floating Point Support
+ \class qfloat16
+ \keyword 16-bit Floating Point Support
\ingroup funclists
- \brief The <QFloat16> header file provides 16-bit floating point support.
-
- This header file provides support for half-precision (16-bit) floating
- point data with the class \c qfloat16. It is fully compliant with IEEE
- 754 as a storage type. This implies that any arithmetic operation on a
- \c qfloat16 instance results in the value first being converted to a
- \c float. This conversion to and from \c float is performed by hardware
- when possible, but on processors that do not natively support half-precision,
- the conversion is performed through a sequence of lookup table operations.
+ \inmodule QtCore
+ \inheaderfile QFloat16
+ \brief Provides 16-bit floating point support.
+
+ The \c qfloat16 class provides support for half-precision (16-bit) floating
+ point data. It is fully compliant with IEEE 754 as a storage type. This
+ implies that any arithmetic operation on a \c qfloat16 instance results in
+ the value first being converted to a \c float. This conversion to and from
+ \c float is performed by hardware when possible, but on processors that do
+ not natively support half-precision, the conversion is performed through a
+ sequence of lookup table operations.
\c qfloat16 should be treated as if it were a POD (plain old data) type.
Consequently, none of the supported operations need any elaboration beyond
@@ -68,7 +70,7 @@ QT_BEGIN_NAMESPACE
/*!
\macro QT_NO_FLOAT16_OPERATORS
- \relates <QFloat16>
+ \relates qfloat16
\since 5.12.4
Defining this macro disables the arithmetic operators for qfloat16.
@@ -81,7 +83,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn bool qIsInf(qfloat16 f)
- \relates <QFloat16>
+ \relates qfloat16
Returns true if the \c qfloat16 \a {f} is equivalent to infinity.
@@ -90,7 +92,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn bool qIsNaN(qfloat16 f)
- \relates <QFloat16>
+ \relates qfloat16
Returns true if the \c qfloat16 \a {f} is not a number (NaN).
@@ -99,7 +101,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn bool qIsFinite(qfloat16 f)
- \relates <QFloat16>
+ \relates qfloat16
Returns true if the \c qfloat16 \a {f} is a finite number.
@@ -130,7 +132,7 @@ QT_BEGIN_NAMESPACE
\since 5.14
\fn bool qfloat16::isNormal() const noexcept
- Tests whether this \c qfloat16 value is finite and in normal form.
+ Returns \c true if this \c qfloat16 value is finite and in normal form.
\sa qFpClassify()
*/
@@ -167,7 +169,7 @@ int qfloat16::fpClassify() const noexcept
}
/*! \fn int qRound(qfloat16 value)
- \relates <QFloat16>
+ \relates qfloat16
Rounds \a value to the nearest integer.
@@ -175,7 +177,7 @@ int qfloat16::fpClassify() const noexcept
*/
/*! \fn qint64 qRound64(qfloat16 value)
- \relates <QFloat16>
+ \relates qfloat16
Rounds \a value to the nearest 64-bit integer.
@@ -183,7 +185,7 @@ int qfloat16::fpClassify() const noexcept
*/
/*! \fn bool qFuzzyCompare(qfloat16 p1, qfloat16 p2)
- \relates <QFloat16>
+ \relates qfloat16
Compares the floating point value \a p1 and \a p2 and
returns \c true if they are considered equal, otherwise \c false.
@@ -256,7 +258,7 @@ static void qFloatFromFloat16_fast(float *, const quint16 *, qsizetype) noexcept
#endif
/*!
\since 5.11
- \relates <QFloat16>
+ \relates qfloat16
Converts \a len floats from \a in to qfloat16 and stores them in \a out.
Both \a in and \a out must have \a len allocated entries.
@@ -272,7 +274,7 @@ Q_CORE_EXPORT void qFloatToFloat16(qfloat16 *out, const float *in, qsizetype len
/*!
\since 5.11
- \relates <QFloat16>
+ \relates qfloat16
Converts \a len qfloat16 from \a in to floats and stores them in \a out.
Both \a in and \a out must have \a len allocated entries.