summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/animation/qvariantanimation.cpp4
-rw-r--r--src/corelib/codecs/qtextcodec.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp2
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp4
-rw-r--r--src/corelib/kernel/qpointer.cpp8
-rw-r--r--src/corelib/kernel/qvariant.cpp6
-rw-r--r--src/corelib/serialization/qdatastream.cpp3
-rw-r--r--src/corelib/statemachine/qstate.cpp2
-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
-rw-r--r--src/gui/accessible/qaccessible.cpp2
-rw-r--r--src/gui/image/qicon.cpp2
-rw-r--r--src/gui/image/qpicture.cpp4
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp2
-rw-r--r--src/gui/kernel/qopenglcontext.cpp4
-rw-r--r--src/gui/kernel/qwindow.cpp2
-rw-r--r--src/gui/text/qtextobject.cpp4
-rw-r--r--src/gui/vulkan/qvulkaninstance.cpp2
-rw-r--r--src/network/socket/qlocalserver.cpp2
-rw-r--r--src/network/socket/qtcpserver.cpp2
-rw-r--r--src/network/ssl/qsslcertificate.cpp2
-rw-r--r--src/network/ssl/qsslkey_p.cpp4
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp4
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp4
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp4
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp4
-rw-r--r--src/widgets/itemviews/qtreewidgetitemiterator.cpp8
-rw-r--r--src/widgets/kernel/qapplication.cpp4
-rw-r--r--src/widgets/kernel/qlayout.cpp8
-rw-r--r--src/widgets/util/qundoview.cpp2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp6
-rw-r--r--src/widgets/widgets/qmdiarea.cpp6
-rw-r--r--src/widgets/widgets/qmenubar.cpp4
-rw-r--r--src/xml/dom/qdom.cpp2
-rw-r--r--src/xml/sax/qxml.cpp2
42 files changed, 138 insertions, 158 deletions
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index e935ac711e..ac81f89ed4 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -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)
{
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index ffd8a2ce93..b7bb3196af 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -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
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index f14229896f..9234a23f3a 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -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
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 69b2a9bf41..9a3d5c6ef4 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -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.
*/
/*!
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index e6b313863f..94b7ccd761 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -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,
diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp
index c3dee7989e..068314633b 100644
--- a/src/corelib/kernel/qpointer.cpp
+++ b/src/corelib/kernel/qpointer.cpp
@@ -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()
*/
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 18c7f7648d..3b7be3d12f 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -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.
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
index ead6ed5083..02c1d1c573 100644
--- a/src/corelib/serialization/qdatastream.cpp
+++ b/src/corelib/serialization/qdatastream.cpp
@@ -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.
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index ae13d4e4cf..62dd4f0284 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -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.
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
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index 46dec7f28d..6b825fa001 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -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.
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index c3c4b24678..80fa65daac 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -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)
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 56b82abcfa..bba36b09cd 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -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.
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index 3e3c7a6211..2390c62b9f 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -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()
*/
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index bf3403f2e4..5bc6e27eb2 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -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.
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 590e2a85bb..476a7f2ffb 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -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
{
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index 18c5a4f3dd..547b21c02e 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -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
{
diff --git a/src/gui/vulkan/qvulkaninstance.cpp b/src/gui/vulkan/qvulkaninstance.cpp
index 9895fec2ca..2941bfd01f 100644
--- a/src/gui/vulkan/qvulkaninstance.cpp
+++ b/src/gui/vulkan/qvulkaninstance.cpp
@@ -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().
*/
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index c5bd599a51..3e36a7b229 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -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()
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 56c700ca8f..98e58192a2 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -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
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 0156b5bf96..4820953468 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -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.
diff --git a/src/network/ssl/qsslkey_p.cpp b/src/network/ssl/qsslkey_p.cpp
index b29b38beab..5c90719fcd 100644
--- a/src/network/ssl/qsslkey_p.cpp
+++ b/src/network/ssl/qsslkey_p.cpp
@@ -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.
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 8ef53afaea..799e984a68 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -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
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index d29f74e93d..e486037e08 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -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
{
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index e46d25bef1..37bb370e73 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -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
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index ec4897a7ae..0fb9e28385 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -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
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index 29cc199526..d2dc91b18c 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -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
diff --git a/src/widgets/itemviews/qtreewidgetitemiterator.cpp b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
index 1c1f60bc37..14c19fcb9c 100644
--- a/src/widgets/itemviews/qtreewidgetitemiterator.cpp
+++ b/src/widgets/itemviews/qtreewidgetitemiterator.cpp
@@ -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.
*/
/*!
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index b4a091765b..8f339a23f6 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -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.
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index e3f6a56875..53c4de49c6 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -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.
diff --git a/src/widgets/util/qundoview.cpp b/src/widgets/util/qundoview.cpp
index c862cbcea5..f59d87fb9d 100644
--- a/src/widgets/util/qundoview.cpp
+++ b/src/widgets/util/qundoview.cpp
@@ -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()
*/
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index fae3aebba4..9c4c46f2d6 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -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
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index feea7cd050..8b201dcf9d 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -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()
*/
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index e7984078de..a53d7841f4 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -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
{
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index cffc1974af..0516d426e5 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -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
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 0e3a87e883..b2fff5b61f 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -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&,