diff --git a/src/corelib/global/qcompare.cpp b/src/corelib/global/qcompare.cpp index 9d1273c4e6a..1fc9c57a73c 100644 --- a/src/corelib/global/qcompare.cpp +++ b/src/corelib/global/qcompare.cpp @@ -1099,7 +1099,7 @@ CHECK(strong, equivalent); */ /*! - \fn template Qt::compareThreeWay(LeftInt lhs, RightInt rhs) + \fn template = true> Qt::compareThreeWay(LeftInt lhs, RightInt rhs) \since 6.7 \relates \overload @@ -1137,7 +1137,7 @@ CHECK(strong, equivalent); */ /*! - \fn template Qt::compareThreeWay(LeftFloat lhs, RightFloat rhs) + \fn template = true> Qt::compareThreeWay(LeftFloat lhs, RightFloat rhs) \since 6.7 \relates \overload @@ -1176,7 +1176,7 @@ CHECK(strong, equivalent); */ /*! - \fn template Qt::compareThreeWay(IntType lhs, FloatType rhs) + \fn template = true> Qt::compareThreeWay(IntType lhs, FloatType rhs) \since 6.7 \relates \overload @@ -1196,7 +1196,7 @@ CHECK(strong, equivalent); */ /*! - \fn template Qt::compareThreeWay(FloatType lhs, IntType rhs) + \fn template = true> Qt::compareThreeWay(FloatType lhs, IntType rhs) \since 6.7 \relates \overload @@ -1216,7 +1216,7 @@ CHECK(strong, equivalent); */ /*! - \fn template Qt::compareThreeWay(const LeftType *lhs, const RightType *rhs) + \fn template = true> Qt::compareThreeWay(const LeftType *lhs, const RightType *rhs) \since 6.7 \relates \overload @@ -1232,7 +1232,7 @@ CHECK(strong, equivalent); */ /*! - \fn template Qt::compareThreeWay(Enum lhs, Enum rhs) + \fn template = true> Qt::compareThreeWay(Enum lhs, Enum rhs) \since 6.7 \relates \overload diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 9eef41b1dc1..21448b8c146 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -765,7 +765,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel */ /*! - \fn template = true> void QRandomGenerator::fillRange(UInt *buffer, qsizetype count) + \fn template = true> void QRandomGenerator::fillRange(UInt *buffer, qsizetype count) Generates \a count 32- or 64-bit quantities (depending on the type \c UInt) and stores them in the buffer pointed by \a buffer. This is the most @@ -781,7 +781,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel */ /*! - \fn template = true> void QRandomGenerator::fillRange(UInt (&buffer)[N]) + \fn template = true> void QRandomGenerator::fillRange(UInt (&buffer)[N]) Generates \c N 32- or 64-bit quantities (depending on the type \c UInt) and stores them in the \a buffer array. This is the most efficient way to diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 800c416505c..c1749526bcc 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -212,7 +212,7 @@ void QPersistentModelIndexData::destroy(QPersistentModelIndexData *data) */ /*! - \fn template = true> QModelRoleDataSpan::QModelRoleDataSpan(Container &c) noexcept + \fn template = true> QModelRoleDataSpan::QModelRoleDataSpan(Container &c) noexcept Constructs an QModelRoleDataSpan spanning over the container \a c, which can be any contiguous container of QModelRoleData objects. diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index da1309cb704..2752697dbae 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2828,7 +2828,7 @@ Qt::PermissionStatus QCoreApplication::checkPermission(const QPermission &permis } /*! - \fn template ::value, bool> = true> void QCoreApplication::requestPermission( + \fn template void QCoreApplication::requestPermission( const QPermission &permission, Functor &&functor) Requests the given \a permission. diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 77312ee691f..0078dc32958 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -143,11 +143,15 @@ public: # endif // Q_QDOC #ifndef QT_NO_CONTEXTLESS_CONNECT + #ifdef Q_QDOC + template + #else // requestPermission to a functor or function pointer (without context) template ::value, bool> = true> + #endif void requestPermission(const QPermission &permission, Functor &&func) { requestPermission(permission, nullptr, std::forward(func)); diff --git a/src/corelib/kernel/qpermissions.cpp b/src/corelib/kernel/qpermissions.cpp index 46b989c50c2..d0d2d9eb100 100644 --- a/src/corelib/kernel/qpermissions.cpp +++ b/src/corelib/kernel/qpermissions.cpp @@ -226,7 +226,7 @@ Q_LOGGING_CATEGORY(lcPermissions, "qt.permissions", QtWarningMsg); */ /*! - \fn template > QPermission::QPermission(const T &type) + \fn template > QPermission::QPermission(const T &type) Constructs a permission from the given \l{typed permission} \a type. @@ -240,7 +240,7 @@ Q_LOGGING_CATEGORY(lcPermissions, "qt.permissions", QtWarningMsg); */ /*! - \fn template > std::optional QPermission::value() const + \fn template > std::optional QPermission::value() const Returns the \l{typed permission} of type \c T, or \c{std::nullopt} if this QPermission object doesn't contain one. diff --git a/src/corelib/kernel/qpointer.qdoc b/src/corelib/kernel/qpointer.qdoc index 3cbc18b9570..f018a53876d 100644 --- a/src/corelib/kernel/qpointer.qdoc +++ b/src/corelib/kernel/qpointer.qdoc @@ -99,8 +99,8 @@ */ /*! - \fn template template = true> QPointer::QPointer(QPointer &&other) - \fn template template = true> QPointer::QPointer(const QPointer &other) + \fn template template ::if_convertible = true> QPointer::QPointer(QPointer &&other) + \fn template template ::if_convertible = true> QPointer::QPointer(const QPointer &other) \since 6.6 Conversion constructor. Constructs a new QPointer by moving or copying from @@ -113,7 +113,7 @@ */ /*! - \fn template template = true> QPointer &QPointer::operator=(const QPointer &other) + \fn template template ::if_convertible = true> QPointer &QPointer::operator=(const QPointer &other) \since 6.6 Conversion assignment operator. Makes this guarded pointer guard the @@ -124,7 +124,7 @@ */ /*! - \fn template template = true> &QPointer::operator=(QPointer &&other) + \fn template template ::if_convertible = true> &QPointer::operator=(QPointer &&other) \since 6.6.1 Conversion move-assignment operator. Makes this guarded pointer guard the diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index cca00724170..b1ce28425de 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -544,7 +544,7 @@ QVariant::QVariant(const QVariant &p) } /*! - \fn template = true> QVariant::QVariant(std::in_place_type_t, Args&&... args) noexcept(is_noexcept_constructible, Args...>::value) + \fn template = true> QVariant::QVariant(std::in_place_type_t, Args&&... args) noexcept(is_noexcept_constructible, Args...>::value) \since 6.6 Constructs a new variant containing a value of type \c T. The contained @@ -561,7 +561,7 @@ QVariant::QVariant(const QVariant &p) /*! - \fn template &, Args...> = true> explicit QVariant::QVariant(std::in_place_type_t, std::initializer_list il, Args&&... args) noexcept(is_noexcept_constructible, std::initializer_list &, Args... >::value) + \fn template &, Args...> = true> explicit QVariant::QVariant(std::in_place_type_t, std::initializer_list il, Args&&... args) noexcept(is_noexcept_constructible, std::initializer_list &, Args... >::value) \since 6.6 \overload @@ -572,7 +572,7 @@ QVariant::QVariant(const QVariant &p) /*! - \fn template = true> QVariant::emplace(Args&&... args) + \fn template = true> QVariant::emplace(Args&&... args) \since 6.6 Replaces the object currently held in \c{*this} with an object of @@ -583,7 +583,7 @@ QVariant::QVariant(const QVariant &p) */ /*! - \fn template &, Args...> = true> QVariant::emplace(std::initializer_list list, Args&&... args) + \fn template &, Args...> = true> QVariant::emplace(std::initializer_list list, Args&&... args) \since 6.6 \overload @@ -2686,7 +2686,7 @@ QT_WARNING_POP \sa setValue(), value() */ -/*! \fn template = true> static QVariant QVariant::fromValue(T &&value) +/*! \fn template = true> static QVariant QVariant::fromValue(T &&value) \since 6.6 \overload diff --git a/src/corelib/text/qanystringview.cpp b/src/corelib/text/qanystringview.cpp index c9e5dca53f6..dd52b776788 100644 --- a/src/corelib/text/qanystringview.cpp +++ b/src/corelib/text/qanystringview.cpp @@ -129,7 +129,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template = true> QAnyStringView::QAnyStringView(const Char *str, qsizetype len) + \fn template = true> QAnyStringView::QAnyStringView(const Char *str, qsizetype len) Constructs a string view on \a str with length \a len. @@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template = true> QAnyStringView::QAnyStringView(const Char *first, const Char *last) + \fn template = true> QAnyStringView::QAnyStringView(const Char *first, const Char *last) Constructs a string view on \a first with length (\a last - \a first). @@ -221,7 +221,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template > QAnyStringView::QAnyStringView(const Container &str) + \fn template > QAnyStringView::QAnyStringView(const Container &str) Constructs a string view on \a str. The length is taken from \c{std::size(str)}. diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 1f496bd404c..69d21cbe24d 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -2134,7 +2134,7 @@ QByteArray& QByteArray::append(char ch) */ /*! - \fn template > QByteArray &QByteArray::assign(InputIterator first, InputIterator last) + \fn template > QByteArray &QByteArray::assign(InputIterator first, InputIterator last) \since 6.6 Replaces the contents of this byte array with a copy of the elements in the diff --git a/src/corelib/text/qbytearrayview.qdoc b/src/corelib/text/qbytearrayview.qdoc index 93e5fafd96a..2dc63e469c8 100644 --- a/src/corelib/text/qbytearrayview.qdoc +++ b/src/corelib/text/qbytearrayview.qdoc @@ -184,7 +184,7 @@ */ /*! - \fn template = true> QByteArrayView::QByteArrayView(const Byte *data, qsizetype len) + \fn template = true> QByteArrayView::QByteArrayView(const Byte *data, qsizetype len) Constructs a byte array view on \a data with length \a len. @@ -202,7 +202,7 @@ */ /*! - \fn template = true> QByteArrayView::QByteArrayView(const Byte *first, const Byte *last) + \fn template = true> QByteArrayView::QByteArrayView(const Byte *first, const Byte *last) Constructs a byte array view on \a first with length (\a last - \a first). @@ -270,7 +270,7 @@ */ /*! - \fn template = true> QByteArrayView::QByteArrayView(const Container &c) + \fn template = true> QByteArrayView::QByteArrayView(const Container &c) Constructs a byte array view on the array-like container \a c. The length and data are set via \c{std::size(c)} and \c{std::data(c)} respectively. diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index fae2ea0a733..0ff1738f517 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -3341,7 +3341,7 @@ QString &QString::append(QChar ch) */ /*! - \fn template > QString &QString::assign(InputIterator first, InputIterator last) + \fn template > QString &QString::assign(InputIterator first, InputIterator last) \since 6.6 Replaces the contents of this string with a copy of the elements in the diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp index da1e264be39..0ddd9236559 100644 --- a/src/corelib/text/qstringview.cpp +++ b/src/corelib/text/qstringview.cpp @@ -179,7 +179,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template = true> QStringView::QStringView(const Char *str, qsizetype len) + \fn template = true> QStringView::QStringView(const Char *str, qsizetype len) Constructs a string view on \a str with length \a len. @@ -195,7 +195,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template = true> QStringView::QStringView(const Char *first, const Char *last) + \fn template = true> QStringView::QStringView(const Char *first, const Char *last) Constructs a string view on \a first with length (\a last - \a first). @@ -262,7 +262,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template > QStringView::QStringView(const Container &str) + \fn template > QStringView::QStringView(const Container &str) Constructs a string view on \a str. The length is taken from \c{std::size(str)}. @@ -281,7 +281,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template = true> static QStringView QStringView::fromArray(const Char (&string)[Size]) noexcept + \fn template = true> static QStringView QStringView::fromArray(const Char (&string)[Size]) noexcept Constructs a string view on the full character string literal \a string, including any trailing \c{Char(0)}. If you don't want the diff --git a/src/corelib/text/qutf8stringview.qdoc b/src/corelib/text/qutf8stringview.qdoc index e3db41fe578..dbc524bdb57 100644 --- a/src/corelib/text/qutf8stringview.qdoc +++ b/src/corelib/text/qutf8stringview.qdoc @@ -217,7 +217,7 @@ */ /*! - \fn template = true> QUtf8StringView::QUtf8StringView(const Char *str, qsizetype len) + \fn template = true> QUtf8StringView::QUtf8StringView(const Char *str, qsizetype len) Constructs a string view on \a str with length \a len. @@ -233,7 +233,7 @@ */ /*! - \fn template = true> QUtf8StringView::QUtf8StringView(const Char *first, const Char *last) + \fn template = true> QUtf8StringView::QUtf8StringView(const Char *first, const Char *last) Constructs a string view on \a first with length (\a last - \a first). @@ -287,7 +287,7 @@ */ /*! - \fn template > QUtf8StringView::QUtf8StringView(const Container &str) + \fn template > QUtf8StringView::QUtf8StringView(const Container &str) Constructs a string view on \a str. The length is taken from \c{std::size(str)}. @@ -306,7 +306,7 @@ */ /*! - \fn template > QUtf8StringView::fromArray(const Char (&string)[Size]) + \fn template > QUtf8StringView::fromArray(const Char (&string)[Size]) Constructs a string view on the full character string literal \a string, including any trailing \c{Char(0)}. If you don't want the diff --git a/src/corelib/thread/qrunnable.cpp b/src/corelib/thread/qrunnable.cpp index bcb19d7af47..f9d69ed5cbb 100644 --- a/src/corelib/thread/qrunnable.cpp +++ b/src/corelib/thread/qrunnable.cpp @@ -101,7 +101,7 @@ void QRunnable::QGenericRunnable::run() */ /*! - \fn template> QRunnable *QRunnable::create(Callable &&callableToRun); + \fn template> QRunnable *QRunnable::create(Callable &&callableToRun); \since 5.15 Creates a QRunnable that calls \a callableToRun in run(). diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index 04bd6b2c77b..55968135053 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -274,7 +274,7 @@ Constructs a list from the std::initializer_list given by \a args. */ -/*! \fn template template = true> QList::QList(InputIterator first, InputIterator last) +/*! \fn template template ::if_input_iterator = true> QList::QList(InputIterator first, InputIterator last) \since 5.14 Constructs a list with the contents in the iterator range [\a first, \a last). @@ -1550,7 +1550,7 @@ list or this list is shared. */ -/*! \fn template template > QList& QList::assign(InputIterator first, InputIterator last) +/*! \fn template template ::if_input_iterator> QList& QList::assign(InputIterator first, InputIterator last) \since 6.6 Replaces the contents of this list with a copy of the elements in the diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index f5be9308080..515eb9dc751 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -269,7 +269,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn template template = true> QScopedArrayPointer::QScopedArrayPointer(D * p) + \fn template template ::if_same_type = true> QScopedArrayPointer::QScopedArrayPointer(D * p) Constructs a QScopedArrayPointer and stores the array of objects pointed to by \a p. diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index 5bf2324647a..0553b760ac5 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -103,7 +103,7 @@ lists. */ -/*! \fn template template> QVarLengthArray::QVarLengthArray(InputIterator first, InputIterator last) +/*! \fn template template::if_input_iterator> QVarLengthArray::QVarLengthArray(InputIterator first, InputIterator last) \since 5.14 Constructs an array with the contents in the iterator range [\a first, \a last). @@ -1006,7 +1006,7 @@ allocate memory if \a n exceeds the capacity of the container. */ -/*! \fn template template > QVarLengthArray& QVarLengthArray::assign(InputIterator first, InputIterator last) +/*! \fn template template ::if_input_iterator> QVarLengthArray& QVarLengthArray::assign(InputIterator first, InputIterator last) \since 6.6 Replaces the contents of this container with a copy of the elements in the diff --git a/src/corelib/tools/qversionnumber.cpp b/src/corelib/tools/qversionnumber.cpp index 75dadb6837c..a589b0f0d19 100644 --- a/src/corelib/tools/qversionnumber.cpp +++ b/src/corelib/tools/qversionnumber.cpp @@ -557,7 +557,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template = true> static bool QTypeRevision::isValidSegment(Integer segment) + \fn template = true> static bool QTypeRevision::isValidSegment(Integer segment) Returns true if the given number can be used as either major or minor version in a QTypeRevision. The valid range for \a segment is \c {>= 0} and \c {< 255}. @@ -572,7 +572,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template = true, if_valid_segment_type = true> static QTypeRevision QTypeRevision::fromVersion(Major majorVersion, Minor minorVersion) + \fn template = true, QTypeRevision::if_valid_segment_type = true> static QTypeRevision QTypeRevision::fromVersion(Major majorVersion, Minor minorVersion) Produces a QTypeRevision from the given \a majorVersion and \a minorVersion, both of which need to be a valid segments. @@ -581,7 +581,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template = true> static QTypeRevision QTypeRevision::fromMajorVersion(Major majorVersion) + \fn template = true> static QTypeRevision QTypeRevision::fromMajorVersion(Major majorVersion) Produces a QTypeRevision from the given \a majorVersion with an invalid minor version. \a majorVersion needs to be a valid segment. @@ -590,7 +590,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template = true> static QTypeRevision QTypeRevision::fromMinorVersion(Minor minorVersion) + \fn template = true> static QTypeRevision QTypeRevision::fromMinorVersion(Minor minorVersion) Produces a QTypeRevision from the given \a minorVersion with an invalid major version. \a minorVersion needs to be a valid segment. @@ -599,7 +599,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template = true> static QTypeRevision QTypeRevision::fromEncodedVersion(Integer value) + \fn template = true> static QTypeRevision QTypeRevision::fromEncodedVersion(Integer value) Produces a QTypeRevision from the given \a value. \a value encodes both the minor and major versions in the least significant and second least @@ -660,7 +660,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template = true> Integer QTypeRevision::toEncodedVersion() const + \fn template = true> Integer QTypeRevision::toEncodedVersion() const Transforms the revision into an integer value, encoding the minor version into the least significant byte, and the major version into