diff options
author | Topi Reinio <[email protected]> | 2025-03-03 11:54:29 +0000 |
---|---|---|
committer | Topi Reinio <[email protected]> | 2025-03-05 15:43:42 +0000 |
commit | b6a01d7d22583263a16242af604e74bbe694d766 (patch) | |
tree | b8568d43671280269c641ce691c6e7e457e5a82e | |
parent | 351b7a31aa24a704dba09121d91cb34190892315 (diff) |
Doc: Fix incorrect \fn signatures
Several \fn signatures were either incorrect or missing qualifiers
required to make QDoc match the documentation with the declarations.
These were not caught in the CI when testing documentation builds due
to a bug in QDoc.
Pick-to: 6.9
Task-number: QTBUG-134250
Change-Id: I7a4af11d9bc3687597b348cc2d4ee15212e0281f
Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qsocketnotifier.cpp | 2 | ||||
-rw-r--r-- | src/corelib/text/qstring.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qhash.cpp | 16 | ||||
-rw-r--r-- | src/gui/math3d/qmatrix4x4.cpp | 3 |
5 files changed, 17 insertions, 16 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 54857f9f307..a12efad25ab 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -3919,7 +3919,8 @@ void QMetaObject::connectSlotsByName(QObject *o) } /*! - \fn template<typename PointerToMemberFunction> QMetaObject::Connection QMetaObject::connect(const QObject *sender, const QMetaMethod &signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) + \fn template<typename PointerToMemberFunction> QMetaObject::Connection QMetaObject::connect( + const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) \threadsafe \overload connect() @@ -3949,7 +3950,8 @@ void QMetaObject::connectSlotsByName(QObject *o) */ /*! - \fn template<typename Functor> QMetaObject::Connection QMetaObject::connect(const QObject *sender, const QMetaMethod &signal, const QObject *context, Functor functor, Qt::ConnectionType type) + \fn template<typename PointerToMemberFunction, typename Functor> QMetaObject::Connection QMetaObject::connect( + const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) \threadsafe \overload connect() diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp index 4e4cf3666bd..22b836c1518 100644 --- a/src/corelib/kernel/qsocketnotifier.cpp +++ b/src/corelib/kernel/qsocketnotifier.cpp @@ -173,7 +173,7 @@ QSocketNotifier::~QSocketNotifier() /*! - \fn void QSocketNotifier::activated(int socket) + \fn void QSocketNotifier::activated(int socket, QPrivateSignal) \deprecated To avoid unintended truncation of the descriptor, use the QSocketDescriptor overload of this function. If you need compatibility with versions older than 5.15 you need to change diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 1b5a7a176e0..c0cc5d16164 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -8761,7 +8761,7 @@ static QString replaceArgEscapes(QStringView s, const ArgEscapeData &d, qsizetyp } /*! - \fn template <typename T, if_string_like<T> = true> QString QString::arg(const T &a, int fieldWidth, QChar fillChar) const + \fn template <typename T, QString::if_string_like<T> = true> QString QString::arg(const T &a, int fieldWidth, QChar fillChar) const Returns a copy of this string with the lowest-numbered place-marker replaced by string \a a, i.e., \c %1, \c %2, ..., \c %99. @@ -8827,7 +8827,7 @@ QString QString::arg_impl(QAnyStringView a, int fieldWidth, QChar fillChar) cons } /*! - \fn template <typename T, if_integral_non_char<T> = true> QString QString::arg(T a, int fieldWidth, int base, QChar fillChar) const + \fn template <typename T, QString::if_integral_non_char<T> = true> QString QString::arg(T a, int fieldWidth, int base, QChar fillChar) const \overload arg() The \a a argument is expressed in base \a base, which is 10 by @@ -8919,7 +8919,7 @@ QString QString::arg_impl(qulonglong a, int fieldWidth, int base, QChar fillChar } /*! - \fn template <typename T, if_floating_point<T> = true> QString QString::arg(T a, int fieldWidth, char format, int precision, QChar fillChar) const + \fn template <typename T, QString::if_floating_point<T> = true> QString QString::arg(T a, int fieldWidth, char format, int precision, QChar fillChar) const \overload arg() Argument \a a is formatted according to the specified \a format and diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 3ab27434e17..3e756bdb478 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -1240,7 +1240,7 @@ uint qt_hash(QStringView key, uint chained) noexcept */ /*! - \fn template <typname T, std::enable_if_t<std::is_same_v<T, bool>, bool> = true> size_t qHash(T key, size_t seed) + \fn template <typename T, std::enable_if_t<std::is_same_v<T, bool>, bool> = true> size_t qHash(T key, size_t seed) \since 6.9 \qhashbuiltin @@ -2339,7 +2339,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \fn template <class Key, class T> template <typename... Args> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryEmplace(const Key &key, Args &&...args) \fn template <class Key, class T> template <typename... Args> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryEmplace(Key &&key, Args &&...args) - \fn template <class Key, class T> template <typename K, typename... Args, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryEmplace(K &&key, Args &&...args) + \fn template <class Key, class T> template <typename K, typename... Args, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryEmplace(K &&key, Args &&...args) \since 6.9 Inserts a new item with the \a key and a value constructed from \a args. @@ -2382,7 +2382,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \fn template <class Key, class T> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryInsert(const Key &key, const T &value) - \fn template <class Key, class T> template <typename K, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryInsert(K &&key, const T &value) + \fn template <class Key, class T> template <typename K, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::tryInsert(K &&key, const T &value) \since 6.9 Inserts a new item with the \a key and a value of \a value. @@ -2397,7 +2397,7 @@ size_t qHash(long double key, size_t seed) noexcept */ /*! - \fn template <class Key, class T> template <typename K, typename... Args, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> QHash<Key, T>::try_emplace(const_iterator hint, K &&key, Args &&...args) + \fn template <class Key, class T> template <typename K, typename... Args, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> iterator QHash<Key, T>::try_emplace(const_iterator hint, K &&key, Args &&...args) \fn template <class Key, class T> template <typename... Args> iterator QHash<Key, T>::try_emplace(const_iterator hint, const Key &key, Args &&...args) \fn template <class Key, class T> template <typename... Args> iterator QHash<Key, T>::try_emplace(const_iterator hint, Key &&key, Args &&...args) \since 6.9 @@ -2418,7 +2418,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \fn template <class Key, class T> template <typename... Args> std::pair<iterator, bool> QHash<Key, T>::try_emplace(const Key &key, Args &&...args) \fn template <class Key, class T> template <typename... Args> std::pair<iterator, bool> QHash<Key, T>::try_emplace(Key &&key, Args &&...args) - \fn template <class Key, class T> template <typename K, typename... Args, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> QHash<Key, T>::try_emplace(K &&key, Args &&...args) + \fn template <class Key, class T> template <typename K, typename... Args, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> std::pair<iterator, bool> QHash<Key, T>::try_emplace(K &&key, Args &&...args) \since 6.9 Inserts a new item with the \a key and a value constructed from \a args. @@ -2436,7 +2436,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \fn template <class Key, class T> template <typename Value> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::insertOrAssign(const Key &key, Value &&value) \fn template <class Key, class T> template <typename Value> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::insertOrAssign(Key &&key, Value &&value) - \fn template <class Key, class T> template <typename K, typename Value, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::insertOrAssign(K &&key, Value &&value) + \fn template <class Key, class T> template <typename K, typename Value, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> QHash<Key, T>::TryEmplaceResult QHash<Key, T>::insertOrAssign(K &&key, Value &&value) \since 6.9 Attempts to insert an item with the \a key and \a value. @@ -2453,7 +2453,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \fn template <class Key, class T> template <typename Value> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(const Key &key, Value &&value) \fn template <class Key, class T> template <typename Value> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(Key &&key, Value &&value) - \fn template <class Key, class T> template <typename K, typename Value, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(K &&key, Value &&value) + \fn template <class Key, class T> template <typename K, typename Value, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(K &&key, Value &&value) \since 6.9 Attempts to insert an item with the \a key and \a value. @@ -2471,7 +2471,7 @@ size_t qHash(long double key, size_t seed) noexcept /*! \fn template <class Key, class T> template <typename Value> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(const_iterator hint, const Key &key, Value &&value) \fn template <class Key, class T> template <typename Value> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(const_iterator hint, Key &&key, Value &&value) - \fn template <class Key, class T> template <typename K, typename Value, if_heterogeneously_searchable<K> = true, if_key_constructible_from<K> = true> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(const_iterator hint, K &&key, Value &&value) + \fn template <class Key, class T> template <typename K, typename Value, QHash<Key, T>::if_heterogeneously_searchable<K> = true, QHash<Key, T>::if_key_constructible_from<K> = true> std::pair<QHash<Key, T>::key_value_iterator, bool> QHash<Key, T>::insert_or_assign(const_iterator hint, K &&key, Value &&value) \since 6.9 Attempts to insert an item with the \a key and \a value. diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index 013908a714f..1703fa5b0fe 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -729,8 +729,7 @@ QMatrix4x4 operator/(const QMatrix4x4& matrix, float divisor) } /*! - \fn bool qFuzzyCompare(const QMatrix4x4& m1, const QMatrix4x4& m2) - \relates QMatrix4x4 + \fn bool QMatrix4x4::qFuzzyCompare(const QMatrix4x4& m1, const QMatrix4x4& m2) Returns \c true if \a m1 and \a m2 are equal, allowing for a small fuzziness factor for floating-point comparisons; false otherwise. |