summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-04-28 12:52:19 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-05-08 12:48:32 +0000
commit69f6cab0af78285472deb8d91c862c600685e618 (patch)
tree86df032204ac028dae8bc3ebe190e198e432444f /src/corelib/tools
parenta5725561da44215e43b808732ad22fdca4d91454 (diff)
Doc: replace even more null/0/nullptr with \nullptr macro
Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qbytearray.cpp4
-rw-r--r--src/corelib/tools/qlocale.cpp12
-rw-r--r--src/corelib/tools/qscopedpointer.cpp37
-rw-r--r--src/corelib/tools/qshareddata.cpp12
-rw-r--r--src/corelib/tools/qsharedpointer.cpp79
-rw-r--r--src/corelib/tools/qstring.cpp25
-rw-r--r--src/corelib/tools/qstring.h2
7 files changed, 76 insertions, 95 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 0f27071176..6cc41a8956 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1038,8 +1038,8 @@ QByteArray qUncompress(const uchar* data, int nbytes)
\snippet code/src_corelib_tools_qbytearray.cpp 5
All functions except isNull() treat null byte arrays the same as
- empty byte arrays. For example, data() returns a pointer to a
- '\\0' character for a null byte array (\e not a null pointer),
+ empty byte arrays. For example, data() returns a valid pointer
+ (\e not nullptr) to a '\\0' character for a byte array
and QByteArray() compares equal to QByteArray(""). We recommend
that you always use isEmpty() and avoid isNull().
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index e55331a5f9..152c2edb50 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1337,7 +1337,7 @@ uint QLocale::toUInt(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1359,7 +1359,7 @@ long QLocale::toLong(const QString &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1546,7 +1546,7 @@ uint QLocale::toUInt(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1568,7 +1568,7 @@ long QLocale::toLong(const QStringRef &s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1764,7 +1764,7 @@ uint QLocale::toUInt(QStringView s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
@@ -1786,7 +1786,7 @@ long QLocale::toLong(QStringView s, bool *ok) const
If the conversion fails the function returns 0.
- If \a ok is not \c nullptr, failure is reported by setting *\a{ok}
+ If \a ok is not \nullptr, failure is reported by setting *\a{ok}
to \c false, and success by setting *\a{ok} to \c true.
This function ignores leading and trailing whitespace.
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 769a18f9e0..eb08bdba62 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -157,7 +157,7 @@ QT_BEGIN_NAMESPACE
Provides access to the scoped pointer's object.
- If the contained pointer is \c null, behavior is undefined.
+ If the contained pointer is \nullptr, behavior is undefined.
\sa isNull()
*/
@@ -166,7 +166,7 @@ QT_BEGIN_NAMESPACE
Provides access to the scoped pointer's object.
- If the contained pointer is \c null, behavior is undefined.
+ If the contained pointer is \nullptr, behavior is undefined.
\sa isNull()
*/
@@ -174,8 +174,8 @@ QT_BEGIN_NAMESPACE
/*!
\fn template <typename T, typename Cleanup> QScopedPointer<T, Cleanup>::operator bool() const
- Returns \c true if this object is not \c null. This function is suitable
- for use in \tt if-constructs, like:
+ Returns \c true if the contained pointer is not \nullptr.
+ This function is suitable for use in \tt if-constructs, like:
\snippet code/src_corelib_tools_qscopedpointer.cpp 3
@@ -185,18 +185,14 @@ QT_BEGIN_NAMESPACE
/*!
\fn template <typename T, typename Cleanup> bool operator==(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs)
- Equality operator. Returns \c true if the scoped pointers
- \a lhs and \a rhs are pointing to the same object.
- Otherwise returns \c false.
+ Returns \c true if \a ptr1 and \a ptr2 refer to the same pointer.
*/
/*!
\fn template <typename T, typename Cleanup> bool operator!=(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs)
- Inequality operator. Returns \c true if the scoped pointers
- \a lhs and \a rhs are \e not pointing to the same object.
- Otherwise returns \c false.
+ Returns \c true if \a lhs and \a rhs refer to distinct pointers.
*/
/*!
@@ -204,7 +200,7 @@ QT_BEGIN_NAMESPACE
\relates QScopedPointer
\since 5.8
- Returns \c true if the scoped pointer \a lhs is a null pointer.
+ Returns \c true if \a lhs refers to \nullptr.
\sa QScopedPointer::isNull()
*/
@@ -214,7 +210,7 @@ QT_BEGIN_NAMESPACE
\relates QScopedPointer
\since 5.8
- Returns \c true if the scoped pointer \a rhs is a null pointer.
+ Returns \c true if \a rhs refers to \nullptr.
\sa QScopedPointer::isNull()
*/
@@ -224,8 +220,7 @@ QT_BEGIN_NAMESPACE
\relates QScopedPointer
\since 5.8
- Returns \c true if the scoped pointer \a lhs is a valid (i.e. a non-null)
- pointer.
+ Returns \c true if \a lhs refers to a valid (i.e. non-null) pointer.
\sa QScopedPointer::isNull()
*/
@@ -235,8 +230,7 @@ QT_BEGIN_NAMESPACE
\relates QScopedPointer
\since 5.8
- Returns \c true if the scoped pointer \a rhs is a valid (i.e. a non-null)
- pointer.
+ Returns \c true if \a rhs refers to a valid (i.e. non-null) pointer.
\sa QScopedPointer::isNull()
*/
@@ -244,7 +238,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::isNull() const
- Returns \c true if this object is holding a pointer that is \c null.
+ Returns \c true if this object refers to \nullptr.
*/
/*!
@@ -262,15 +256,14 @@ QT_BEGIN_NAMESPACE
\fn template <typename T, typename Cleanup> T *QScopedPointer<T, Cleanup>::take()
Returns the value of the pointer referenced by this object. The pointer of this
- QScopedPointer object will be reset to \c null.
+ QScopedPointer object will be reset to \nullptr.
Callers of this function take ownership of the pointer.
*/
/*! \fn template <typename T, typename Cleanup> bool QScopedPointer<T, Cleanup>::operator!() const
- Returns \c true if the pointer referenced by this object is \c null, otherwise
- returns \c false.
+ Returns \c true if this object refers to \nullptr.
\sa isNull()
*/
@@ -325,7 +318,7 @@ QT_BEGIN_NAMESPACE
Provides access to entry \a i of the scoped pointer's array of
objects.
- If the contained pointer is \c null, behavior is undefined.
+ If the contained pointer is \nullptr, behavior is undefined.
\sa isNull()
*/
@@ -336,7 +329,7 @@ QT_BEGIN_NAMESPACE
Provides access to entry \a i of the scoped pointer's array of
objects.
- If the contained pointer is \c null, behavior is undefined.
+ If the contained pointer is \nullptr behavior is undefined.
\sa isNull()
*/
diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp
index dcfda40eda..2748f9d95f 100644
--- a/src/corelib/tools/qshareddata.cpp
+++ b/src/corelib/tools/qshareddata.cpp
@@ -321,7 +321,7 @@ QT_BEGIN_NAMESPACE
*/
/*! \fn template <class T> QSharedDataPointer<T>::QSharedDataPointer()
- Constructs a QSharedDataPointer initialized with a null \e{d pointer}.
+ Constructs a QSharedDataPointer initialized with \nullptr as \e{d pointer}.
*/
/*!
@@ -494,8 +494,8 @@ QT_BEGIN_NAMESPACE
*/
/*! \fn template <class T> QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer()
- Constructs a QExplicitlySharedDataPointer initialized with a null
- \e{d pointer}.
+ Constructs a QExplicitlySharedDataPointer initialized with \nullptr
+ as \e{d pointer}.
*/
/*! \fn template <class T> QExplicitlySharedDataPointer<T>::~QExplicitlySharedDataPointer()
@@ -573,8 +573,8 @@ QT_BEGIN_NAMESPACE
*/
/*! \fn template <class T> void QExplicitlySharedDataPointer<T>::reset()
- Resets \e this to be null. i.e., this function sets the
- \e{d pointer} of \e this to 0, but first it decrements
+ Resets \e this to be null - i.e., this function sets the
+ \e{d pointer} of \e this to \nullptr, but first it decrements
the reference count of the shared data object and deletes
the shared data object if the reference count became 0.
*/
@@ -582,7 +582,7 @@ QT_BEGIN_NAMESPACE
/*! \fn template <class T> T *QExplicitlySharedDataPointer<T>::take()
\since 5.12
- Returns a pointer to the shared object, and resets \e this to be null.
+ Returns a pointer to the shared object, and resets \e this to be \nullptr.
That is, this function sets the \e{d pointer} of \e this to \nullptr.
*/
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index 9e9466f6b1..8c0f8379fb 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -401,7 +401,8 @@
/*!
\fn template <class T> QSharedPointer<T>::QSharedPointer()
- Creates a QSharedPointer that points to null (0).
+ Creates a QSharedPointer that is null (the object is holding
+ a reference to \nullptr).
*/
/*!
@@ -547,6 +548,7 @@
Provides access to the shared pointer's members.
+ If the contained pointer is \nullptr, behavior is undefined.
\sa isNull()
*/
@@ -555,21 +557,21 @@
Provides access to the shared pointer's members.
+ If the contained pointer is \nullptr, behavior is undefined.
\sa isNull()
*/
/*!
\fn template <class T> bool QSharedPointer<T>::isNull() const
- Returns \c true if this object is holding a reference to a null
- pointer.
+ Returns \c true if this object refers to \nullptr.
*/
/*!
\fn template <class T> QSharedPointer<T>::operator bool() const
- Returns \c true if this object is not null. This function is suitable
- for use in \tt if-constructs, like:
+ Returns \c true if the contained pointer is not \nullptr.
+ This function is suitable for use in \tt if-constructs, like:
\snippet code/src_corelib_tools_qsharedpointer.cpp 4
@@ -579,8 +581,8 @@
/*!
\fn template <class T> bool QSharedPointer<T>::operator !() const
- Returns \c true if this object is \nullptr. This function is
- suitable for use in \tt if-constructs, like:
+ Returns \c true if this object refers to \nullptr.
+ This function is suitable for use in \tt if-constructs, like:
\snippet code/src_corelib_tools_qsharedpointer.cpp 5
@@ -803,11 +805,10 @@
/*!
\fn template <class T> bool QWeakPointer<T>::isNull() const
- Returns \c true if this object is holding a reference to a null
- pointer.
+ Returns \c true if this object refers to \nullptr.
Note that, due to the nature of weak references, the pointer that
- QWeakPointer references can become null at any moment, so
+ QWeakPointer references can become \nullptr at any moment, so
the value returned from this function can change from false to
true from one call to the next.
*/
@@ -815,13 +816,13 @@
/*!
\fn template <class T> QWeakPointer<T>::operator bool() const
- Returns \c true if this object is not null. This function is suitable
- for use in \tt if-constructs, like:
+ Returns \c true if the contained pointer is not \nullptr.
+ This function is suitable for use in \tt if-constructs, like:
\snippet code/src_corelib_tools_qsharedpointer.cpp 8
Note that, due to the nature of weak references, the pointer that
- QWeakPointer references can become null at any moment, so
+ QWeakPointer references can become \nullptr at any moment, so
the value returned from this function can change from true to
false from one call to the next.
@@ -831,13 +832,13 @@
/*!
\fn template <class T> bool QWeakPointer<T>::operator !() const
- Returns \c true if this object is \nullptr. This function is
- suitable for use in \tt if-constructs, like:
+ Returns \c true if this object refers to \nullptr.
+ This function is suitable for use in \tt if-constructs, like:
\snippet code/src_corelib_tools_qsharedpointer.cpp 9
Note that, due to the nature of weak references, the pointer that
- QWeakPointer references can become null at any moment, so
+ QWeakPointer references can become \nullptr at any moment, so
the value returned from this function can change from false to
true from one call to the next.
@@ -918,7 +919,7 @@
If \c this (that is, the subclass instance invoking this method) is being
managed by a QSharedPointer, returns a shared pointer instance pointing to
- \c this; otherwise returns a QSharedPointer holding a null pointer.
+ \c this; otherwise returns a null QSharedPointer.
*/
/*!
@@ -933,8 +934,7 @@
\fn template <class T> template <class X> bool operator==(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QSharedPointer
- Returns \c true if the pointer referenced by \a ptr1 is the
- same pointer as that referenced by \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to the same pointer.
If \a ptr2's template parameter is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -947,8 +947,7 @@
\fn template <class T> template <class X> bool operator!=(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QSharedPointer
- Returns \c true if the pointer referenced by \a ptr1 is not the
- same pointer as that referenced by \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to distinct pointers.
If \a ptr2's template parameter is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -961,8 +960,7 @@
\fn template <class T> template <class X> bool operator==(const QSharedPointer<T> &ptr1, const X *ptr2)
\relates QSharedPointer
- Returns \c true if the pointer referenced by \a ptr1 is the
- same pointer as \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to the same pointer.
If \a ptr2's type is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -975,8 +973,7 @@
\fn template <class T> template <class X> bool operator!=(const QSharedPointer<T> &ptr1, const X *ptr2)
\relates QSharedPointer
- Returns \c true if the pointer referenced by \a ptr1 is not the
- same pointer as \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to distinct pointers.
If \a ptr2's type is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -1017,8 +1014,7 @@
\fn template <class T> template <class X> bool operator==(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
\relates QWeakPointer
- Returns \c true if the pointer referenced by \a ptr1 is the
- same pointer as that referenced by \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to the same pointer.
If \a ptr2's template parameter is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -1031,8 +1027,7 @@
\fn template <class T> template <class X> bool operator!=(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
\relates QWeakPointer
- Returns \c true if the pointer referenced by \a ptr1 is not the
- same pointer as that referenced by \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to distinct pointers.
If \a ptr2's template parameter is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -1045,8 +1040,7 @@
\fn template <class T> template <class X> bool operator==(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QWeakPointer
- Returns \c true if the pointer referenced by \a ptr1 is the
- same pointer as that referenced by \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to the same pointer.
If \a ptr2's template parameter is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
@@ -1060,7 +1054,7 @@
\relates QSharedPointer
\since 5.8
- Returns \c true if the pointer referenced by \a lhs is a null pointer.
+ Returns \c true if \a lhs refers to \nullptr.
\sa QSharedPointer::isNull()
*/
@@ -1070,7 +1064,7 @@
\relates QSharedPointer
\since 5.8
- Returns \c true if the pointer referenced by \a rhs is a null pointer.
+ Returns \c true if \a rhs refers to \nullptr.
\sa QSharedPointer::isNull()
*/
@@ -1080,8 +1074,7 @@
\relates QSharedPointer
\since 5.8
- Returns \c true if the pointer referenced by \a lhs is a valid (i.e.
- non-null) pointer.
+ Returns \c true if \a lhs refers to a valid (i.e. non-null) pointer.
\sa QSharedPointer::isNull()
*/
@@ -1091,8 +1084,7 @@
\relates QSharedPointer
\since 5.8
- Returns \c true if the pointer referenced by \a rhs is a valid (i.e.
- non-null) pointer.
+ Returns \c true if \a rhs refers to a valid (i.e. non-null) pointer.
\sa QSharedPointer::isNull()
*/
@@ -1102,7 +1094,7 @@
\relates QWeakPointer
\since 5.8
- Returns \c true if the pointer referenced by \a lhs is a null pointer.
+ Returns \c true if \a lhs refers to \nullptr.
\sa QWeakPointer::isNull()
*/
@@ -1112,7 +1104,7 @@
\relates QWeakPointer
\since 5.8
- Returns \c true if the pointer referenced by \a rhs is a null pointer.
+ Returns \c true if \a rhs refers to \nullptr.
\sa QWeakPointer::isNull()
*/
@@ -1122,8 +1114,7 @@
\relates QWeakPointer
\since 5.8
- Returns \c true if the pointer referenced by \a lhs is a valid (i.e.
- non-null) pointer.
+ Returns \c true if \a lhs refers to a valid (i.e. non-null) pointer.
\sa QWeakPointer::isNull()
*/
@@ -1133,8 +1124,7 @@
\relates QWeakPointer
\since 5.8
- Returns \c true if the pointer referenced by \a rhs is a valid (i.e.
- non-null) pointer.
+ Returns \c true if \a rhs refers to a valid (i.e. non-null) pointer.
\sa QWeakPointer::isNull()
*/
@@ -1143,8 +1133,7 @@
\fn template <class T> template <class X> bool operator!=(const QWeakPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
\relates QWeakPointer
- Returns \c true if the pointer referenced by \a ptr1 is not the
- same pointer as that referenced by \a ptr2.
+ Returns \c true if \a ptr1 and \a ptr2 refer to distinct pointers.
If \a ptr2's template parameter is different from \a ptr1's,
QSharedPointer will attempt to perform an automatic \tt static_cast
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index a123aa8e75..ee9d486eb8 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -1685,10 +1685,9 @@ const QString::Null QString::null = { };
\snippet qstring/main.cpp 8
All functions except isNull() treat null strings the same as empty
- strings. For example, toUtf8().constData() returns a pointer to a
- '\\0' character for a null string (\e not a null pointer), and
- QString() compares equal to QString(""). We recommend that you
- always use the isEmpty() function and avoid isNull().
+ strings. For example, toUtf8().constData() returns a valid pointer
+ (\e not nullptr) to a '\\0' character for a null string. We
+ recommend that you always use the isEmpty() function and avoid isNull().
\section1 Argument Formats
@@ -4553,7 +4552,7 @@ int QString::indexOf(const QRegularExpression& re, int from) const
expression \a re in the string, searching forward from index
position \a from. Returns -1 if \a re didn't match anywhere.
- If the match is successful and \a rmatch is not a null pointer, it also
+ If the match is successful and \a rmatch is not \nullptr, it also
writes the results of the match into the QRegularExpressionMatch object
pointed to by \a rmatch.
@@ -4604,7 +4603,7 @@ int QString::lastIndexOf(const QRegularExpression &re, int from) const
expression \a re in the string, which starts before the index
position \a from. Returns -1 if \a re didn't match anywhere.
- If the match is successful and \a rmatch is not a null pointer, it also
+ If the match is successful and \a rmatch is not \nullptr, it also
writes the results of the match into the QRegularExpressionMatch object
pointed to by \a rmatch.
@@ -4655,14 +4654,14 @@ bool QString::contains(const QRegularExpression &re) const
Returns \c true if the regular expression \a re matches somewhere in this
string; otherwise returns \c false.
- If the match is successful and \a match is not a null pointer, it also
+ If the match is successful and \a rmatch is not \nullptr, it also
writes the results of the match into the QRegularExpressionMatch object
- pointed to by \a match.
+ pointed to by \a rmatch.
\sa QRegularExpression::match()
*/
-bool QString::contains(const QRegularExpression &re, QRegularExpressionMatch *match) const
+bool QString::contains(const QRegularExpression &re, QRegularExpressionMatch *rmatch) const
{
if (!re.isValid()) {
qWarning("QString::contains: invalid QRegularExpression object");
@@ -4670,8 +4669,8 @@ bool QString::contains(const QRegularExpression &re, QRegularExpressionMatch *ma
}
QRegularExpressionMatch m = re.match(*this);
bool hasMatch = m.hasMatch();
- if (hasMatch && match)
- *match = qMove(m);
+ if (hasMatch && rmatch)
+ *rmatch = qMove(m);
return hasMatch;
}
@@ -10333,8 +10332,8 @@ ownership of it, no memory is freed when instances are destroyed.
/*!
\fn bool QStringRef::isNull() const
- Returns \c true if string() returns a null pointer or a pointer to a
- null string; otherwise returns \c true.
+ Returns \c true if this string reference does not reference a string or if
+ the string it references is null (i.e. QString::isNull() is true).
\sa size()
*/
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index da76601e88..b138c3f140 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -359,7 +359,7 @@ public:
int lastIndexOf(const QRegularExpression &re, int from = -1) const;
int lastIndexOf(const QRegularExpression &re, int from, QRegularExpressionMatch *rmatch) const; // ### Qt 6: merge overloads
bool contains(const QRegularExpression &re) const;
- bool contains(const QRegularExpression &re, QRegularExpressionMatch *match) const; // ### Qt 6: merge overloads
+ bool contains(const QRegularExpression &re, QRegularExpressionMatch *rmatch) const; // ### Qt 6: merge overloads
int count(const QRegularExpression &re) const;
#endif