From 739e7dd1912b1828bd568fd50c0dffaa6550b80a Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 29 Oct 2020 18:11:22 +0100 Subject: Doc: Fix various documentation issues for Qt Core Task-number: QTBUG-86295 Change-Id: I3bf7d4b1533d4fc81114d353b19beaf4ea9b93b2 Reviewed-by: Volker Hilsheimer Reviewed-by: Paul Wicking --- src/corelib/kernel/qdeadlinetimer.cpp | 5 ++--- src/corelib/kernel/qmetaobject.cpp | 4 ++-- src/corelib/kernel/qmetatype.cpp | 4 ++-- src/corelib/kernel/qmimedata.cpp | 2 +- src/corelib/kernel/qobject.cpp | 5 ++--- src/corelib/kernel/qobjectdefs.h | 4 ++-- src/corelib/kernel/qproperty.cpp | 4 ++-- src/corelib/plugin/qpluginloader.cpp | 4 ++-- src/corelib/text/qbytearray.cpp | 2 +- src/corelib/text/qlocale.qdoc | 1 + src/corelib/tools/qcontiguouscache.cpp | 26 +++++++++++++------------- src/corelib/tools/qiterator.qdoc | 10 +++++----- src/corelib/tools/qpair.qdoc | 7 +++++++ 13 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/corelib/kernel/qdeadlinetimer.cpp b/src/corelib/kernel/qdeadlinetimer.cpp index 0fcfffd98f..a225713ce0 100644 --- a/src/corelib/kernel/qdeadlinetimer.cpp +++ b/src/corelib/kernel/qdeadlinetimer.cpp @@ -873,7 +873,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep */ /*! - \fn bool QDeadlineTimer::operator==(QDeadlineTimer d1, QDeadlineTimer::QDeadlineTimer d2) + \fn bool QDeadlineTimer::operator==(QDeadlineTimer d1, QDeadlineTimer d2) Returns true if the deadline on \a d1 and the deadline in \a d2 are the same, false otherwise. The timer type used to create the two deadlines is @@ -951,8 +951,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep */ /*! - \fn QDeadlineTimer operator+(QDeadlineTimer dt, qint64 msecs) - \relates QDeadlineTimer + \fn QDeadlineTimer QDeadlineTimer::operator+(QDeadlineTimer dt, qint64 msecs) Returns a QDeadlineTimer object whose deadline is \a msecs later than the deadline stored in \a dt. If \a dt is set to never expire, this function diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 6b6e2b0912..baf7ce81ec 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -2943,7 +2943,7 @@ const char *QMetaProperty::typeName() const Returns this property's type. The return value is one of the values of the QVariant::Type enumeration. - \sa metaType().id(), typeName(), name(), metaType() + \sa typeName(), name(), metaType() */ /*! \fn int QMetaProperty::userType() const @@ -3248,7 +3248,7 @@ bool QMetaProperty::reset(QObject *object) const If the property doesn't support bindings, the returned interface will be invalid. - \sa QUntypedBindable, QProperty, isBindable() + \sa QObjectBindableProperty, QProperty, isBindable() */ QUntypedBindable QMetaProperty::bindable(QObject *object) const { diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index be76a3f1d9..d4ab51d323 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -409,7 +409,7 @@ Q_GLOBAL_STATIC(QMetaTypeCustomRegistry, customTypeRegistry) \value NeedsConstruction This type has non-trivial constructors. If the flag is not set instances can be safely initialized with memset to 0. \value NeedsDestruction This type has a non-trivial destructor. If the flag is not set calls to the destructor are not necessary before discarding objects. - \value ReloctableType An instance of a type having this attribute can be safely moved to a different memory location using memcpy. + \value RelocatableType An instance of a type having this attribute can be safely moved to a different memory location using memcpy. \omitvalue MovableType \omitvalue SharedPointerToQObject \value IsEnumeration This type is an enumeration. @@ -2580,7 +2580,7 @@ Q_CORE_EXPORT int qMetaTypeTypeInternal(const char *typeName) } /*! - \fn int QMetaType::type(const QByteArray &typeName) + \fn int QMetaType::type(const QT_PREPEND_NAMESPACE(QByteArray) &typeName) \since 5.5 \overload diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp index a370639a64..d99874bd67 100644 --- a/src/corelib/kernel/qmimedata.cpp +++ b/src/corelib/kernel/qmimedata.cpp @@ -320,7 +320,7 @@ QT_WARNING_POP QMacPasteboardMime maps MIME to Mac flavors. \sa QClipboard, QDragEnterEvent, QDragMoveEvent, QDropEvent, QDrag, - QMacPasteboardMime, {Drag and Drop} + {Drag and Drop} */ /*! diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index fc46ab84f8..f3fd249d09 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4217,8 +4217,8 @@ QDebug operator<<(QDebug dbg, const QObject *o) \relates QObject This macro associates extra information to the class, which is available - using QObject::metaObject(). Qt makes only limited use of this feature, in - the \l{Active Qt}, \l{Qt D-Bus} and \l{Qt QML module}{Qt QML}. + using QObject::metaObject(). Qt makes only limited use of this feature in + \l{Qt D-Bus} and \l{Qt QML module}{Qt QML}. The extra information takes the form of a \a Name string and a \a Value literal string. @@ -4228,7 +4228,6 @@ QDebug operator<<(QDebug dbg, const QObject *o) \snippet code/src_corelib_kernel_qobject.cpp 35 \sa QMetaObject::classInfo() - \sa QAxFactory \sa {Using Qt D-Bus Adaptors} \sa {Extending QML} */ diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 2c1415f7b6..5ade222ac5 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -459,9 +459,9 @@ public: operator RestrictedBool() const { return d_ptr && isConnected_helper() ? &Connection::d_ptr : nullptr; } #endif - Connection(Connection &&o) noexcept : d_ptr(qExchange(o.d_ptr, nullptr)) {} + Connection(Connection &&other) noexcept : d_ptr(qExchange(other.d_ptr, nullptr)) {} QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(Connection) - void swap(Connection &o) noexcept { qSwap(d_ptr, o.d_ptr); } + void swap(Connection &other) noexcept { qSwap(d_ptr, other.d_ptr); } }; inline void swap(QMetaObject::Connection &lhs, QMetaObject::Connection &rhs) noexcept diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index e4f12500a3..b55069d1ae 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -1038,7 +1038,7 @@ QString QPropertyBindingError::description() const expression and returns the previously associated binding. The first time the property value is read, the binding is evaluated. Whenever a dependency of the binding changes, the binding will be re-evaluated the next time the value of - this property is read. When the property value changes \a owner is notified + this property is read. When the property value changes, the owner is notified via the Callback function. */ @@ -1051,7 +1051,7 @@ QString QPropertyBindingError::description() const is read, the binding is evaluated by invoking the call operator () of \a f. Whenever a dependency of the binding changes, the binding will be re-evaluated the next time the value of this property is read. When the property value - changes \a owner is notified via the Callback function. + changes, the owner is notified via the Callback function. */ /*! diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index db8db85fc0..131506f73e 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -464,9 +464,9 @@ QList QPluginLoader::staticPlugins() */ /*! - \fn QObject *QStaticPlugin::instance() + \variable QStaticPlugin::instance - Returns the plugin instance. + Holds the plugin instance. \sa QPluginLoader::staticInstances() */ diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index ac46c6f0b7..c6dbf4c7aa 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -532,7 +532,7 @@ quint16 qChecksum(QByteArrayView data, Qt::ChecksumType standard) The default value is -1, which specifies zlib's default compression. - \sa qUncompress() + \sa qUncompress(const QByteArray &data) */ /*! \relates QByteArray diff --git a/src/corelib/text/qlocale.qdoc b/src/corelib/text/qlocale.qdoc index 6fbf720307..eb72e1ed8e 100644 --- a/src/corelib/text/qlocale.qdoc +++ b/src/corelib/text/qlocale.qdoc @@ -314,6 +314,7 @@ \value Nepali \value Newari Since Qt 5.7 \value Ngiemboon + \value NigerianPidgin Since Qt 6.0 \value Ngomba \value Nko Since Qt 5.5 \value NorthernLuri Since Qt 5.7 diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp index cc3510ef88..95537961f9 100644 --- a/src/corelib/tools/qcontiguouscache.cpp +++ b/src/corelib/tools/qcontiguouscache.cpp @@ -119,7 +119,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) See the \l{Contiguous Cache Example}{Contiguous Cache} example. */ -/*! \fn template QContiguousCache::QContiguousCache(int capacity) +/*! \fn template QContiguousCache::QContiguousCache(qsizetype capacity) Constructs a cache with the given \a capacity. @@ -224,7 +224,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa operator==() */ -/*! \fn template int QContiguousCache::capacity() const +/*! \fn template qsizetype QContiguousCache::capacity() const Returns the number of items the cache can store before it is full. When a cache contains a number of items equal to its capacity, adding new @@ -233,12 +233,12 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa setCapacity(), size() */ -/*! \fn template int QContiguousCache::count() const +/*! \fn template qsizetype QContiguousCache::count() const Same as size(). */ -/*! \fn template int QContiguousCache::size() const +/*! \fn template qsizetype QContiguousCache::size() const Returns the number of items contained within the cache. @@ -260,7 +260,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa size(), capacity() */ -/*! \fn template int QContiguousCache::available() const +/*! \fn template qsizetype QContiguousCache::available() const Returns the number of items that can be added to the cache before it becomes full. @@ -272,7 +272,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) Removes all items from the cache. The capacity is unchanged. */ -/*! \fn template void QContiguousCache::setCapacity(int size) +/*! \fn template void QContiguousCache::setCapacity(qsizetype size) Sets the capacity of the cache to the given \a size. A cache can hold a number of items equal to its capacity. When inserting, appending or prepending @@ -285,7 +285,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa capacity(), isFull() */ -/*! \fn template const T &QContiguousCache::at(int i) const +/*! \fn template const T &QContiguousCache::at(qsizetype i) const Returns the item at index position \a i in the cache. \a i must be a valid index position in the cache (i.e, firstIndex() <= \a i <= lastIndex()). @@ -299,7 +299,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa firstIndex(), lastIndex(), insert(), operator[]() */ -/*! \fn template T &QContiguousCache::operator[](int i) +/*! \fn template T &QContiguousCache::operator[](qsizetype i) Returns the item at index position \a i as a modifiable reference. If the cache does not contain an item at the given index position \a i @@ -314,7 +314,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa insert(), at() */ -/*! \fn template const T &QContiguousCache::operator[](int i) const +/*! \fn template const T &QContiguousCache::operator[](qsizetype i) const \overload @@ -337,7 +337,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa append(), insert(), isFull() */ -/*! \fn template void QContiguousCache::insert(int i, const T &value) +/*! \fn template void QContiguousCache::insert(qsizetype i, const T &value) Inserts the \a value at the index position \a i. If the cache already contains an item at \a i then that value is replaced. If \a i is either one more than @@ -357,14 +357,14 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa prepend(), append(), isFull(), firstIndex(), lastIndex() */ -/*! \fn template bool QContiguousCache::containsIndex(int i) const +/*! \fn template bool QContiguousCache::containsIndex(qsizetype i) const Returns \c true if the cache's index range includes the given index \a i. \sa firstIndex(), lastIndex() */ -/*! \fn template int QContiguousCache::firstIndex() const +/*! \fn template qsizetype QContiguousCache::firstIndex() const Returns the first valid index in the cache. The index will be invalid if the cache is empty. @@ -372,7 +372,7 @@ void QContiguousCacheData::freeData(QContiguousCacheData *data) \sa capacity(), size(), lastIndex() */ -/*! \fn template int QContiguousCache::lastIndex() const +/*! \fn template qsizetype QContiguousCache::lastIndex() const Returns the last valid index in the cache. The index will be invalid if the cache is empty. diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc index 6ea68c8150..1ba5b66318 100644 --- a/src/corelib/tools/qiterator.qdoc +++ b/src/corelib/tools/qiterator.qdoc @@ -785,7 +785,7 @@ continue iterating over the original map, ignoring the modified copy. - \sa QMutableMultiMapIterator, QMultiMapIterator::const_iterator + \sa QMutableMultiMapIterator */ /*! @@ -1131,7 +1131,7 @@ Calling this function on an iterator located at the back of the container leads to undefined results. - \sa hasNext(), peekNext(), previous() + \sa hasNext(), {QMapIterator::}{peekNext()}, previous() */ /*! \fn template QMutableMapIterator::Item QMutableMapIterator::next() @@ -1177,7 +1177,7 @@ */ /*! \fn template QMapIterator::Item QMapIterator::peekNext() const - \fn template QMutableMapIterator::Item QMutableMapIterator::peekNext() + \fn template QMutableMapIterator::Item QMutableMapIterator::peekNext() const Returns the next item without moving the iterator. @@ -1191,7 +1191,7 @@ */ /*! \fn template QMutableMapIterator::Item QMutableMapIterator::peekNext() const - \fn template QMutableMultiMapIterator::Item QMutableMultiMapIterator::peekNext() + \fn template QMutableMultiMapIterator::Item QMutableMultiMapIterator::peekNext() const Returns a reference to the next item without moving the iterator. @@ -1274,7 +1274,7 @@ Calling this function on an iterator located at the front of the container leads to undefined results. - \sa hasPrevious(), previous(), peekNext() + \sa hasPrevious(), previous(), {QMapIterator::}{peekNext()} */ /*! \fn template const T &QMapIterator::value() const diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc index 0e17b6c3b9..f0290c1830 100644 --- a/src/corelib/tools/qpair.qdoc +++ b/src/corelib/tools/qpair.qdoc @@ -40,6 +40,13 @@ \sa {Container Classes} */ +/*! + \typealias QPair + \relates QPair + \since 6.0 + Typedef for std::pair\. +*/ + /*! \fn template QPair qMakePair(T1 &&value1, T2 &&value2) \obsolete -- cgit v1.2.3