From 194b62fb38a9cad1fcb9bc18389707315e0215be Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 17 Aug 2012 11:31:23 +0200 Subject: [PATCH] doc: Added \relates command to some function qdoc comments When a documented function is global, it must be related to a namespace or class, or its documentation won't be included anywhere. When a documented function is a class member, the function signature in the \fn command must include the class name qualifier, e.g. QImage::isValid(), not just isValid() Change-Id: I53e2230fa9468f94d51aec8cc76781d7ab755a13 Reviewed-by: Casper van Donderen --- src/corelib/global/qnumeric.cpp | 9 +++++++++ src/corelib/kernel/qmath.qdoc | 2 ++ src/corelib/tools/qdatetime.cpp | 2 +- src/gui/image/qimage.cpp | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qnumeric.cpp b/src/corelib/global/qnumeric.cpp index 1e77231..4c9af44 100644 --- a/src/corelib/global/qnumeric.cpp +++ b/src/corelib/global/qnumeric.cpp @@ -46,46 +46,55 @@ QT_BEGIN_NAMESPACE /*! Returns true if the double \a {d} is equivalent to infinity. + \relates */ Q_CORE_EXPORT bool qIsInf(double d) { return qt_is_inf(d); } /*! Returns true if the double \a {d} is not a number (NaN). + \relates */ Q_CORE_EXPORT bool qIsNaN(double d) { return qt_is_nan(d); } /*! Returns true if the double \a {d} is a finite number. + \relates */ Q_CORE_EXPORT bool qIsFinite(double d) { return qt_is_finite(d); } /*! Returns true if the float \a {f} is equivalent to infinity. + \relates */ Q_CORE_EXPORT bool qIsInf(float f) { return qt_is_inf(f); } /*! Returns true if the float \a {f} is not a number (NaN). + \relates */ Q_CORE_EXPORT bool qIsNaN(float f) { return qt_is_nan(f); } /*! Returns true if the float \a {f} is a finite number. + \relates */ Q_CORE_EXPORT bool qIsFinite(float f) { return qt_is_finite(f); } /*! Returns the bit pattern of a signalling NaN as a double. + \relates */ Q_CORE_EXPORT double qSNaN() { return qt_snan(); } /*! Returns the bit pattern of a quiet NaN as a double. + \relates */ Q_CORE_EXPORT double qQNaN() { return qt_qnan(); } /*! Returns the bit pattern for an infinite number as a double. + \relates */ Q_CORE_EXPORT double qInf() { return qt_inf(); } diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc index fcc5176..cba19a8 100644 --- a/src/corelib/kernel/qmath.qdoc +++ b/src/corelib/kernel/qmath.qdoc @@ -58,6 +58,8 @@ /*! \fn qreal qFabs(qreal v) Returns the absolute value of \a v as a qreal. + + \relates */ /*! diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 1621176..293838e 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -275,7 +275,7 @@ QDate::QDate(int y, int m, int d) /*! - \fn bool isValid() const + \fn bool QDate::isValid() const Returns true if this date is valid; otherwise returns false. diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 71ec636..ae760a4 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -594,6 +594,7 @@ bool QImageData::checkForAlphaPixels() const /*! \typedef QImageCleanupFunction + \relates QImage \since 5.0 A function with the following signature that can be used to -- 2.7.4