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>
bb10
Christian Ehrlicher 2019-04-28 12:52:19 +02:00
parent a5725561da
commit 69f6cab0af
42 changed files with 138 additions and 158 deletions

View File

@ -399,7 +399,7 @@ static QBasicMutex registeredInterpolatorsMutex;
Registers a custom interpolator \a func for the template type \c{T}.
The interpolator has to be registered before the animation is constructed.
To unregister (and use the default interpolator) set \a func to 0.
To unregister (and use the default interpolator) set \a func to \nullptr.
*/
/*!
@ -416,7 +416,7 @@ static QBasicMutex registeredInterpolatorsMutex;
* \internal
* Registers a custom interpolator \a func for the specific \a interpolationType.
* The interpolator has to be registered before the animation is constructed.
* To unregister (and use the default interpolator) set \a func to 0.
* To unregister (and use the default interpolator) set \a func to \nullptr.
*/
void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator func, int interpolationType)
{

View File

@ -678,7 +678,7 @@ QList<int> QTextCodec::availableMibs()
\nonreentrant
Set the codec to \a c; this will be returned by
codecForLocale(). If \a c is a null pointer, the codec is reset to
codecForLocale(). If \a c is \nullptr, the codec is reset to
the default.
This might be needed for some applications that want to use their

View File

@ -2919,7 +2919,7 @@ void QSettings::setIniCodec(const char *codecName)
\since 4.5
Returns the codec that is used for accessing INI files. By default,
no codec is used, so a null pointer is returned.
no codec is used, so \nullptr is returned.
*/
QTextCodec *QSettings::iniCodec() const

View File

@ -699,7 +699,7 @@ void QCoreApplicationPrivate::initLocale()
Returns a pointer to the application's QCoreApplication (or
QGuiApplication/QApplication) instance.
If no instance has been allocated, \c null is returned.
If no instance has been allocated, \nullptr is returned.
*/
/*!

View File

@ -797,7 +797,7 @@ static bool check_parent_thread(QObject *parent,
The destructor of a parent object destroys all child objects.
Setting \a parent to 0 constructs an object with no parent. If the
Setting \a parent to \nullptr constructs an object with no parent. If the
object is a widget, it will become a top-level window.
\sa parent(), findChild(), findChildren()
@ -3382,7 +3382,7 @@ bool QMetaObject::disconnectOne(const QObject *sender, int signal_index,
/*!
\internal
Helper function to remove the connection from the senders list and setting the receivers to 0
Helper function to remove the connection from the senders list and set the receivers to \nullptr
*/
bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,
const QObject *receiver, int method_index, void **slot,

View File

@ -45,7 +45,7 @@
\ingroup objectmodel
A guarded pointer, QPointer<T>, behaves like a normal C++
pointer \c{T *}, except that it is automatically set to 0 when the
pointer \c{T *}, except that it is automatically cleared when the
referenced object is destroyed (unlike normal C++ pointers, which
become "dangling pointers" in such cases). \c T must be a
subclass of QObject.
@ -79,7 +79,7 @@
\snippet pointer/pointer.cpp 2
If the QLabel is deleted in the meantime, the \c label variable
will hold 0 instead of an invalid address, and the last line will
will hold \nullptr instead of an invalid address, and the last line will
never be executed.
The functions and operators available with a QPointer are the
@ -93,7 +93,7 @@
For creating guarded pointers, you can construct or assign to them
from a T* or from another guarded pointer of the same type. You
can compare them with each other using operator==() and
operator!=(), or test for 0 with isNull(). You can dereference
operator!=(), or test for \nullptr with isNull(). You can dereference
them using either the \c *x or the \c x->member notation.
A guarded pointer will automatically cast to a \c T *, so you can
@ -113,7 +113,7 @@
/*!
\fn template <class T> QPointer<T>::QPointer()
Constructs a 0 guarded pointer.
Constructs a guarded pointer with value \nullptr.
\sa isNull()
*/

View File

@ -2408,7 +2408,7 @@ void QVariant::clear()
Converts the int representation of the storage type, \a typeId, to
its string representation.
Returns a null pointer if the type is QMetaType::UnknownType or doesn't exist.
Returns \nullptr if the type is QMetaType::UnknownType or doesn't exist.
*/
const char *QVariant::typeToName(int typeId)
{
@ -4144,7 +4144,7 @@ void* QVariant::data()
/*!
Returns \c true if this is a null variant, false otherwise. A variant is
considered null if it contains no initialized value, or the contained value
is a null pointer or is an instance of a built-in type that has an isNull
is \nullptr or is an instance of a built-in type that has an isNull
method, in which case the result would be the same as calling isNull on the
wrapped object.
@ -4224,7 +4224,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
If the QVariant contains a pointer to a type derived from QObject then
\c{T} may be any QObject type. If the pointer stored in the QVariant can be
qobject_cast to T, then that result is returned. Otherwise a null pointer is
qobject_cast to T, then that result is returned. Otherwise \nullptr is
returned. Note that this only works for QObject subclasses which use the
Q_OBJECT macro.

View File

@ -1028,8 +1028,7 @@ QDataStream &QDataStream::operator>>(char *&s)
\c{delete []} operator.
The \a l parameter is set to the length of the buffer. If the
string read is empty, \a l is set to 0 and \a s is set to
a null pointer.
string read is empty, \a l is set to 0 and \a s is set to \nullptr.
The serialization format is a quint32 length specifier first,
then \a l bytes of data.

View File

@ -285,7 +285,7 @@ QAbstractState *QState::errorState() const
/*!
Sets this state's error state to be the given \a state. If the error state
is not set, or if it is set to 0, the state will inherit its parent's error
is not set, or if it is set to \nullptr, the state will inherit its parent's error
state recursively. If no error state is set for the state itself or any of
its ancestors, an error will cause the machine to stop executing and an error
will be printed to the console.

View File

@ -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().

View File

@ -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.

View File

@ -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()
*/

View File

@ -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.
*/

View File

@ -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

View File

@ -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()
*/

View File

@ -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

View File

@ -526,7 +526,7 @@ static void qAccessibleCleanup()
to it.
If the key and the QObject does not have a corresponding
QAccessibleInterface, a null-pointer will be returned.
QAccessibleInterface, \nullptr will be returned.
Installed factories are called by queryAccessibilityInterface() until
one provides an interface.

View File

@ -1523,7 +1523,7 @@ QDebug operator<<(QDebug dbg, const QIcon &i)
foo@3x.png, then foo@2x, then fall back to foo.png if not found.
\a sourceDevicePixelRatio will be set to the value of N if the argument is
a non-null pointer
not \nullptr
*/
QString qt_findAtNxFile(const QString &baseFileName, qreal targetDevicePixelRatio,
qreal *sourceDevicePixelRatio)

View File

@ -1485,8 +1485,8 @@ static QPictureHandler *get_picture_handler(const char *format)
\a format is used to select a handler to write a QPicture; \a header
is used to select a handler to read an picture file.
If \a readPicture is a null pointer, the QPictureIO will not be able
to read pictures in \a format. If \a writePicture is a null pointer,
If \a readPicture is \nullptr, the QPictureIO will not be able
to read pictures in \a format. If \a writePicture is \nullptr,
the QPictureIO will not be able to write pictures in \a format. If
both are null, the QPictureIO object is valid but useless.

View File

@ -1846,7 +1846,7 @@ bool QStandardItem::hasChildren() const
item) takes ownership of \a item. If necessary, the row count and column
count are increased to fit the item.
\note Passing a null pointer as \a item removes the item.
\note Passing \nullptr as \a item removes the item.
\sa child()
*/

View File

@ -787,7 +787,7 @@ QOpenGLExtraFunctions *QOpenGLContext::extraFunctions() const
to the non-template function.
Note that requests for function objects of other versions or profiles can fail and
in doing so will return a null pointer. Situations in which creation of the functions
in doing so will return \nullptr. Situations in which creation of the functions
object can fail are if the request cannot be satisfied due to asking for functions
that are not in the version or profile of this context. For example:
@ -1330,7 +1330,7 @@ bool QOpenGLContext::supportsThreadedOpenGL()
\since 5.5
Returns the application-wide shared OpenGL context, if present.
Otherwise, returns a null pointer.
Otherwise, returns \nullptr.
This is useful if you need to upload OpenGL objects (buffers, textures,
etc.) before creating or showing a QOpenGLWidget or QQuickWidget.

View File

@ -2862,7 +2862,7 @@ void QWindow::setVulkanInstance(QVulkanInstance *instance)
}
/*!
\return the associated Vulkan instance or \c null if there is none.
\return the associated Vulkan instance if any was set, otherwise \nullptr.
*/
QVulkanInstance *QWindow::vulkanInstance() const
{

View File

@ -1316,8 +1316,8 @@ QTextList *QTextBlock::textList() const
/*!
\since 4.1
Returns a pointer to a QTextBlockUserData object if previously set with
setUserData() or a null pointer.
Returns a pointer to a QTextBlockUserData object,
if one has been set with setUserData(), or \nullptr.
*/
QTextBlockUserData *QTextBlock::userData() const
{

View File

@ -614,7 +614,7 @@ VkResult QVulkanInstance::errorCode() const
}
/*!
\return the VkInstance handle this QVulkanInstance wraps, or \c null if
\return the VkInstance handle this QVulkanInstance wraps, or \nullptr if
create() has not yet been successfully called and no existing instance has
been provided via setVkInstance().
*/

View File

@ -408,7 +408,7 @@ int QLocalServer::maxPendingConnections() const
still a good idea to delete the object explicitly when you are done with
it, to avoid wasting memory.
0 is returned if this function is called when there are no pending
\nullptr is returned if this function is called when there are no pending
connections.
\sa hasPendingConnections(), newConnection(), incomingConnection()

View File

@ -548,7 +548,7 @@ bool QTcpServer::hasPendingConnections() const
destroyed. It is still a good idea to delete the object
explicitly when you are done with it, to avoid wasting memory.
0 is returned if this function is called when there are no pending
\nullptr is returned if this function is called when there are no pending
connections.
\note The returned QTcpSocket object cannot be used from another

View File

@ -417,7 +417,7 @@ QByteArray QSslCertificate::digest(QCryptographicHash::Algorithm algorithm) cons
/*!
\fn Qt::HANDLE QSslCertificate::handle() const
Returns a pointer to the native certificate handle, if there is
one, or a null pointer otherwise.
one, else \nullptr.
You can use this handle, together with the native API, to access
extended information about the certificate.

View File

@ -490,8 +490,8 @@ QByteArray QSslKey::toPem(const QByteArray &passPhrase) const
}
/*!
Returns a pointer to the native key handle, if it is available;
otherwise a null pointer is returned.
Returns a pointer to the native key handle, if there is
one, else \nullptr.
You can use this handle together with the native API to access
extended information about the key.

View File

@ -4023,7 +4023,7 @@ QGLWidget::~QGLWidget()
\fn QFunctionPointer QGLContext::getProcAddress(const QString &proc) const
Returns a function pointer to the GL extension function passed in
\a proc. 0 is returned if a pointer to the function could not be
\a proc. \nullptr is returned if a pointer to the function could not be
obtained.
*/
QFunctionPointer QGLContext::getProcAddress(const QString &procName) const

View File

@ -1197,8 +1197,8 @@ QStringList QFileSystemModel::mimeTypes() const
\a indexes. The format used to describe the items corresponding to the
indexes is obtained from the mimeTypes() function.
If the list of indexes is empty, 0 is returned rather than a serialized
empty list.
If the list of indexes is empty, \nullptr is returned rather than a
serialized empty list.
*/
QMimeData *QFileSystemModel::mimeData(const QModelIndexList &indexes) const
{

View File

@ -1902,8 +1902,8 @@ QStringList QListWidget::mimeTypes() const
\a items. The format used to describe the items is obtained from the
mimeTypes() function.
If the list of items is empty, 0 is returned instead of a serialized empty
list.
If the list of items is empty, \nullptr is returned instead of a
serialized empty list.
*/
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
QMimeData *QListWidget::mimeData(const QList<QListWidgetItem *> &items) const

View File

@ -2633,8 +2633,8 @@ QStringList QTableWidget::mimeTypes() const
\a items. The format used to describe the items is obtained from the
mimeTypes() function.
If the list of items is empty, 0 is returned rather than a serialized
empty list.
If the list of items is empty, \nullptr is returned rather than a
serialized empty list.
*/
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
QMimeData *QTableWidget::mimeData(const QList<QTableWidgetItem *> &items) const

View File

@ -3395,8 +3395,8 @@ QStringList QTreeWidget::mimeTypes() const
\a items. The format used to describe the items is obtained from the
mimeTypes() function.
If the list of items is empty, 0 is returned rather than a serialized
empty list.
If the list of items is empty, \nullptr is returned rather than a
serialized empty list.
*/
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
QMimeData *QTreeWidget::mimeData(const QList<QTreeWidgetItem *> &items) const

View File

@ -170,7 +170,7 @@ QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator=(const QTreeWidgetIte
/*!
The prefix ++ operator (++it) advances the iterator to the next matching item
and returns a reference to the resulting iterator.
Sets the current pointer to 0 if the current item is the last matching item.
Sets the current pointer to \nullptr if the current item is the last matching item.
*/
QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator++()
@ -185,7 +185,7 @@ QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator++()
/*!
The prefix -- operator (--it) advances the iterator to the previous matching item
and returns a reference to the resulting iterator.
Sets the current pointer to 0 if the current item is the first matching item.
Sets the current pointer to \nullptr if the current item is the first matching item.
*/
QTreeWidgetItemIterator &QTreeWidgetItemIterator::operator--()
@ -395,7 +395,7 @@ void QTreeWidgetItemIteratorPrivate::ensureValidIterator(const QTreeWidgetItem *
iterator goes backward.)
If the current item is beyond the last item, the current item pointer is
set to 0. Returns the resulting iterator.
set to \nullptr. Returns the resulting iterator.
*/
/*!
@ -411,7 +411,7 @@ void QTreeWidgetItemIteratorPrivate::ensureValidIterator(const QTreeWidgetItem *
iterator goes forward.)
If the current item is ahead of the last item, the current item pointer is
set to 0. Returns the resulting iterator.
set to \nullptr. Returns the resulting iterator.
*/
/*!

View File

@ -1904,8 +1904,8 @@ void QApplication::aboutQt()
This signal is emitted when the widget that has keyboard focus changed from
\a old to \a now, i.e., because the user pressed the tab-key, clicked into
a widget or changed the active window. Both \a old and \a now can be the
null-pointer.
a widget or changed the active window. Both \a old and \a now can be \nullptr.
The signal is emitted after both widget have been notified about the change
through QFocusEvent.

View File

@ -109,7 +109,7 @@ static int menuBarHeightForWidth(QWidget *menubar, int w)
/*!
Constructs a new top-level QLayout, with parent \a parent.
\a parent may not be a \nullptr.
\a parent may not be \nullptr.
The layout is set directly as the top-level layout for
\a parent. There can be only one top-level layout for a
@ -419,9 +419,9 @@ void QLayout::setContentsMargins(const QMargins &margins)
/*!
\since 4.3
Extracts the left, top, right, and bottom margins used around the
layout, and assigns them to *\a left, *\a top, *\a right, and *\a
bottom (unless they are null pointers).
For each of \a left, \a top, \a right and \a bottom that is not
\nullptr, stores the size of the margin named in the location the
pointer refers to.
By default, QLayout uses the values provided by the style. On
most platforms, the margin is 11 pixels in all directions.

View File

@ -361,7 +361,7 @@ QUndoStack *QUndoView::stack() const
Sets the stack displayed by this view to \a stack. If \a stack is 0, the view
will be empty.
If the view was previously looking at a QUndoGroup, the group is set to 0.
If the view was previously looking at a QUndoGroup, the group is set to \nullptr.
\sa stack(), setGroup()
*/

View File

@ -596,7 +596,7 @@ QStatusBar *QMainWindow::statusBar() const
/*!
Sets the status bar for the main window to \a statusbar.
Setting the status bar to 0 will remove it from the main window.
Setting the status bar to \nullptr will remove it from the main window.
Note that QMainWindow takes ownership of the \a statusbar pointer
and deletes it at the appropriate time.
@ -1464,8 +1464,8 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
#if QT_CONFIG(menu)
/*!
Returns a popup menu containing checkable entries for the toolbars and
dock widgets present in the main window. If there are no toolbars and
dock widgets present, this function returns a null pointer.
dock widgets present in the main window. If there are no toolbars and
dock widgets present, this function returns \nullptr.
By default, this function is called by the main window when the user
activates a context menu, typically by right-clicking on a toolbar or a dock

View File

@ -1998,9 +1998,9 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla
Removes \a widget from the MDI area. The \a widget must be
either a QMdiSubWindow or a widget that is the internal widget of
a subwindow. Note \a widget is never actually deleted by QMdiArea.
If a QMdiSubWindow is passed in its parent is set to 0 and it is
removed, but if an internal widget is passed in the child widget
is set to 0 but the QMdiSubWindow is not removed.
If a QMdiSubWindow is passed in, its parent is set to \nullptr and it is
removed; but if an internal widget is passed in, the child widget
is set to \nullptr and the QMdiSubWindow is \e not removed.
\sa addSubWindow()
*/

View File

@ -897,8 +897,8 @@ QAction *QMenuBar::insertMenu(QAction *before, QMenu *menu)
}
/*!
Returns the QAction that is currently highlighted. A null pointer
will be returned if no action is currently selected.
Returns the QAction that is currently highlighted, if any,
else \nullptr.
*/
QAction *QMenuBar::activeAction() const
{

View File

@ -1951,7 +1951,7 @@ void QDomNodePrivate::setLocation(int lineNumber, int columnNumber)
which return a QDomNode, e.g. firstChild(). You can make an
independent (deep) copy of the node with cloneNode().
A QDomNode can be null, much like a null pointer. Creating a copy
A QDomNode can be null, much like \nullptr. Creating a copy
of a null node results in another null node. It is not
possible to modify a null node, but it is possible to assign another,
possibly non-null node to it. In this case, the copy of the null node

View File

@ -2371,7 +2371,7 @@ bool QXmlDefaultHandler::unparsedEntityDecl(const QString&, const QString&,
/*!
\reimp
Sets \a ret to 0, so that the reader uses the system identifier
Sets \a ret to \nullptr, so that the reader uses the system identifier
provided in the XML document.
*/
bool QXmlDefaultHandler::resolveEntity(const QString&, const QString&,