diff options
| author | Topi Reinio <topi.reinio@qt.io> | 2023-12-19 11:09:32 +0000 |
|---|---|---|
| committer | Topi Reiniƶ <topi.reinio@qt.io> | 2023-12-19 22:49:39 +0000 |
| commit | 96740ea3fed8a7837dc282135661723858fff198 (patch) | |
| tree | fc5e1ff65f823405fc38c48d68aea2fef919d124 /src | |
| parent | 38dbd751640399a7887cf91fed73688df209a38d (diff) | |
Doc: Fix documentation issues for Qt Core
* Fix template arguments in \fn signatures for Qt::compareThreeWay()
functions.
* Fix template arguments in \fn signatures for QDebug::operator<<()
functions.
* Fix \sa links to specific overloads of QSpan functions.
* Fix \sa links to specific overloads of QFileInfo::fileTime().
* Remove references to 'Custom Type Example' (example has been removed).
* Fix linking to 'JSON Save Game' example.
* Fix references to 'Queued Custom Type' example.
* Fix linking to QCryptographicHash::Algorithm.
* Fix linking to Qt Qml module.
* Fix undocumented parameters in qHypot().
Pick-to: 6.7
Change-Id: If9eb9978a14e147f003672a682972b319454c311
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/global/qcompare.cpp | 8 | ||||
| -rw-r--r-- | src/corelib/io/qdebug.cpp | 4 | ||||
| -rw-r--r-- | src/corelib/io/qfileinfo.cpp | 23 | ||||
| -rw-r--r-- | src/corelib/kernel/qmath.qdoc | 2 | ||||
| -rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/kernel/qobject.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/tools/qcryptographichash.cpp | 4 | ||||
| -rw-r--r-- | src/corelib/tools/qspan.qdoc | 20 |
8 files changed, 37 insertions, 28 deletions
diff --git a/src/corelib/global/qcompare.cpp b/src/corelib/global/qcompare.cpp index 87595eb1d15..fadcb0f1a26 100644 --- a/src/corelib/global/qcompare.cpp +++ b/src/corelib/global/qcompare.cpp @@ -1138,7 +1138,7 @@ CHECK(strong, equivalent); */ /*! - \fn template <typename LeftInt, typename RightInt, Qt::if_integral<LeftInt, RightInt> = true> Qt::compareThreeWay(LeftInt lhs, RightInt rhs) + \fn template <typename LeftInt, typename RightInt, Qt::if_integral<LeftInt> = true, Qt::if_integral<RightInt> = true> auto Qt::compareThreeWay(LeftInt lhs, RightInt rhs) \since 6.7 \relates <QtCompare> \overload @@ -1176,7 +1176,7 @@ CHECK(strong, equivalent); */ /*! - \fn template <typename LeftFloat, typename RightFloat, Qt::if_floating_point<LeftFloat, RightFloat> = true> Qt::compareThreeWay(LeftFloat lhs, RightFloat rhs) + \fn template <typename LeftFloat, typename RightFloat, Qt::if_floating_point<LeftFloat> = true, Qt::if_floating_point<RightFloat> = true> auto Qt::compareThreeWay(LeftFloat lhs, RightFloat rhs) \since 6.7 \relates <QtCompare> \overload @@ -1215,7 +1215,7 @@ CHECK(strong, equivalent); */ /*! - \fn template <typename IntType, typename FloatType, Qt::if_integral_and_floating_point<IntType, FloatType> = true> Qt::compareThreeWay(IntType lhs, FloatType rhs) + \fn template <typename IntType, typename FloatType, Qt::if_integral<IntType> = true, Qt::if_floating_point<FloatType> = true> auto Qt::compareThreeWay(IntType lhs, FloatType rhs) \since 6.7 \relates <QtCompare> \overload @@ -1235,7 +1235,7 @@ CHECK(strong, equivalent); */ /*! - \fn template <typename FloatType, typename IntType, Qt::if_integral_and_floating_point<IntType, FloatType> = true> Qt::compareThreeWay(FloatType lhs, IntType rhs) + \fn template <typename FloatType, typename IntType, Qt::if_floating_point<FloatType> = true, Qt::if_integral<IntType> = true> auto Qt::compareThreeWay(FloatType lhs, IntType rhs) \since 6.7 \relates <QtCompare> \overload diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index ca5da100229..ad967398fb5 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -985,8 +985,8 @@ QDebug &QDebug::resetFormat() */ /*! - \fn template <typename T, if_qint128<T>> QDebug::operator<<(T i) - \fn template <typename T, if_quint128<T>> QDebug::operator<<(T i) + \fn template <typename T, QDebug::if_qint128<T>> QDebug::operator<<(T i) + \fn template <typename T, QDebug::if_quint128<T>> QDebug::operator<<(T i) \since 6.7 Prints the textual representation of the 128-bit integer \a i. diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index ee0b2bcc0a8..8d252157f9b 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -1496,7 +1496,9 @@ qint64 QFileInfo::size() const (not the symlink). \since 6.6 - \sa lastModified(const QTimeZone &), lastRead(const QTimeZone &), metadataChangeTime(const QTimeZone &), fileTime(QFile::FileTime, const QTimeZone &) + \sa lastModified(const QTimeZone &), lastRead(const QTimeZone &), + metadataChangeTime(const QTimeZone &), + fileTime(QFileDevice::FileTime, const QTimeZone &) */ /*! @@ -1533,8 +1535,9 @@ qint64 QFileInfo::size() const (not the symlink). \since 6.6 - \sa birthTime(const QTimeZone &), lastModified(const QTimeZone &), lastRead(const QTimeZone &), - fileTime(QFile::FileTime time, const QTimeZone &) + \sa birthTime(const QTimeZone &), lastModified(const QTimeZone &), + lastRead(const QTimeZone &), + fileTime(QFileDevice::FileTime time, const QTimeZone &) */ /*! @@ -1562,7 +1565,9 @@ qint64 QFileInfo::size() const (not the symlink). \since 6.6 - \sa birthTime(const QTimeZone &), lastRead(const QTimeZone &), metadataChangeTime(const QTimeZone &), fileTime(QFile::FileTime, const QTimeZone &) + \sa birthTime(const QTimeZone &), lastRead(const QTimeZone &), + metadataChangeTime(const QTimeZone &), + fileTime(QFileDevice::FileTime, const QTimeZone &) */ /*! @@ -1596,7 +1601,9 @@ qint64 QFileInfo::size() const (not the symlink). \since 6.6 - \sa birthTime(const QTimeZone &), lastModified(const QTimeZone &), metadataChangeTime(const QTimeZone &), fileTime(QFile::FileTime, const QTimeZone &) + \sa birthTime(const QTimeZone &), lastModified(const QTimeZone &), + metadataChangeTime(const QTimeZone &), + fileTime(QFileDevice::FileTime, const QTimeZone &) */ #if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED) @@ -1609,7 +1616,7 @@ qint64 QFileInfo::size() const (not the symlink). This function overloads - \l{QFileInfo::fileTime(QFile::FileTime, const QTimeZone &)}, + \l{QFileInfo::fileTime(QFileDevice::FileTime, const QTimeZone &)}, and returns the same as \c{fileTime(time, QTimeZone::LocalTime)}. \since 5.10 @@ -1637,7 +1644,9 @@ QDateTime QFileInfo::fileTime(QFile::FileTime time) const { (not the symlink). \since 6.6 - \sa birthTime(const QTimeZone &), lastModified(const QTimeZone &), lastRead(const QTimeZone &), metadataChangeTime(const QTimeZone &), QDateTime::isValid() + \sa birthTime(const QTimeZone &), lastModified(const QTimeZone &), + lastRead(const QTimeZone &), metadataChangeTime(const QTimeZone &), + QDateTime::isValid() */ QDateTime QFileInfo::fileTime(QFile::FileTime time, const QTimeZone &tz) const { diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc index c15a20d94f8..bc365f26fa6 100644 --- a/src/corelib/kernel/qmath.qdoc +++ b/src/corelib/kernel/qmath.qdoc @@ -132,7 +132,7 @@ \since 6.1 \overload \fn template <typename Tx, typename Ty> auto qHypot(Tx x, Ty y) - Returns the distance of a point (x, y) from the origin (0, 0). + Returns the distance of a point (\a x, \a y) from the origin (0, 0). This is qSqrt(x * x + y * y), optimized. In particular, underflow and overflow may be avoided. diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index a400e2748cb..3d0eeb1683d 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -4150,7 +4150,7 @@ bool QMetaProperty::isBindable() const This mechanism is free for you to use in your Qt applications. \note It's also used by the \l[ActiveQt]{Active Qt}, - \l[QtDBus]{Qt D-Bus}, \l[QtQml]{Qt QML}, and \l{Qt Remote Objects} + \l[QtDBus]{Qt D-Bus}, \l[QtQml]{Qt Qml}, and \l{Qt Remote Objects} modules. Some keys might be set when using these modules. \sa QMetaObject diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 55a3bd53089..4dd1c91b714 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4476,7 +4476,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) This macro associates extra information to the class, which is available using QObject::metaObject(). Qt makes only limited use of this feature in - \l{Qt D-Bus} and \l{Qt QML} modules. + \l{Qt D-Bus} and \l{Qt Qml} modules. The extra information takes the form of a \a Name string and a \a Value literal string. diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 5a321f3a0c4..2e82a394eeb 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -1420,7 +1420,7 @@ void QMessageAuthenticationCodePrivate::initMessageHash() noexcept Use the QMessageAuthenticationCode class to generate hash-based message authentication codes (HMACs). The class supports all cryptographic hash algorithms from \l QCryptographicHash (see also - \l{QCryptographicHash::Algorithms}). + \l{QCryptographicHash::Algorithm}). To generate a message authentication code, pass a suitable hash algorithm and secret key to the constructor. Then process the message @@ -1442,7 +1442,7 @@ void QMessageAuthenticationCodePrivate::initMessageHash() noexcept size of the secret key, and the security of the underlying hash function. - \sa QCryptographicHash, QCryptographicHash::Algorithms + \sa QCryptographicHash, QCryptographicHash::Algorithm */ /*! diff --git a/src/corelib/tools/qspan.qdoc b/src/corelib/tools/qspan.qdoc index 04c8315958e..4e9291adcfe 100644 --- a/src/corelib/tools/qspan.qdoc +++ b/src/corelib/tools/qspan.qdoc @@ -513,7 +513,7 @@ The span must hold at least \c{Count} elements (\c{E} >= \c{Count} \e{and} size() >= \c{Count}), otherwise the behavior is undefined. - \sa first(QSpan::size_type), last(), subspan() + \sa first(QSpan<T,E>::size_type), last(), subspan() */ /*! @@ -525,7 +525,7 @@ The span must hold at least \c{Count} elements (\c{E} >= \c{Count} \e{and} size() >= \c{Count}), otherwise the behavior is undefined. - \sa last(QSpan::size_type), first(), subspan() + \sa last(QSpan<T,E>::size_type), first(), subspan() */ /*! @@ -541,7 +541,7 @@ This span must hold at least \c{Offset} elements (\c{E} >= \c{Offset} \e{and} size() >= \c{Offset}), otherwise the behavior is undefined. - \sa subspan(QSpan::size_type), subspan(), first(), last() + \sa subspan(QSpan<T,E>::size_type), subspan(), first(), last() */ #if 0 // needs fix for QTBUG-118080 integrated into qt5.git @@ -559,7 +559,7 @@ \c{Offset + Count} \e{and} size() >= \c{Offset + Count}), otherwise the behavior is undefined. - \sa subspan(QSpan::size_type, QSpan::size_type), subspan(), first(), last() + \sa subspan(QSpan<T,E>::size_type, QSpan<T,E>::size_type), subspan(), first(), last() */ #endif @@ -578,8 +578,8 @@ The span must hold at least \a n elements (\c{E} >= \a n \e{and} size() >= \a n), otherwise the behavior is undefined. - \sa {first-t}{first<N>()}, last(QSpan::size_type), subspan(QSpan::size_type), - subspan(QSpan::size_type, QSpan::size_type) + \sa {first-t}{first<N>()}, last(QSpan<T,E>::size_type), subspan(QSpan<T,E>::size_type), + subspan(QSpan<T,E>::size_type, QSpan<T,E>::size_type) \sa sliced() */ @@ -594,8 +594,8 @@ The span must hold at least \a n elements (\c{E} >= \a n \e{and} size() >= \a n), otherwise the behavior is undefined. - \sa last(), first(QSpan::size_type), subspan(QSpan::size_type), - subspan(QSpan::size_type, QSpan::size_type), sliced() + \sa last(), first(QSpan<T,E>::size_type), subspan(QSpan<T,E>::size_type), + subspan(QSpan<T,E>::size_type, QSpan<T,E>::size_type), sliced() */ /*! @@ -614,7 +614,7 @@ These functions do the same thing: subspan() is provided for STL compatibility and sliced() is provided for Qt compatibility. - \sa subspan(), first(QSpan::size_type), last(QSpan::size_type) + \sa subspan(), first(QSpan<T,E>::size_type), last(QSpan<T,E>::size_type) */ /*! @@ -634,6 +634,6 @@ These functions do the same thing: subspan() is provided for STL compatibility and sliced() is provided for Qt compatibility. - \sa subspan(), first(QSpan::size_type), last(QSpan::size_type) + \sa subspan(), first(QSpan<T,E>::size_type), last(QSpan<T,E>::size_type) */ |
